1. 10 Sep, 2019 3 commits
  2. 21 Aug, 2019 2 commits
    • Adam Jackson's avatar
      glx: Fix previous context validation in xorgGlxMakeCurrent · 045add84
      Adam Jackson authored
      vnd has already verified that the context tag is valid before this gets
      called, and we only set the context tag private data to non-null for
      indirect clients. Mesa happens to be buggy and doesn't send MakeCurrent
      requests nearly as much as it should for direct contexts, but if you fix
      that, then unbinding a direct context would fail here with
      Sadly Mesa will still need to carry a workaround here for broken
      servers, but we should still fix the server.
      (cherry picked from commit 95dcc81c)
    • Adam Jackson's avatar
      miext/sync: Fix needless ABI change · 8449c862
      Adam Jackson authored
      The initialized field was added in:
          commit 82f01ad7
          Author: Alex Goins <agoins@nvidia.com>
          Date:   Wed Apr 10 13:48:02 2019 -0500
              xsync: Add resource inside of SyncCreate, export SyncCreate
      But it added this field not at the end of SyncObject. It may not have
      been _usefully_ possible to create those from another extension prior to
      that commit, but that's still an ABI-incompatible change.
      (cherry picked from commit 194ba387)
  3. 13 Aug, 2019 5 commits
  4. 26 Jul, 2019 5 commits
  5. 10 Jul, 2019 1 commit
  6. 06 Jun, 2019 1 commit
    • Carlos Garnacho's avatar
      xwayland: Reset scheduled frames after hiding tablet cursor · c86222d4
      Carlos Garnacho authored
      Hiding the tablet tool cursor results in it being hidden forever after.
      This is due to the stale frame callback that will neither be disposed
      or replaced. This can be reproduced in krita (X11) as the pointer
      cursor is hidden while over the canvas.
      Clearing the frame callback ensures the correct behavior in future
      xwl_tablet_tool_set_cursor() calls (i.e. a new cursor surface being
      displayed, and a new frame callback created), and is 1:1
      with xwl_seat_set_cursor() for pointers.
      Signed-off-by: Carlos Garnacho's avatarCarlos Garnacho <carlosg@gnome.org>
      (cherry picked from commit dea4a746)
  7. 05 Jun, 2019 3 commits
    • Olivier Fourdan's avatar
      glamor: Make pixmap exportable from `gbm_bo_from_pixmap()` · 6e199e46
      Olivier Fourdan authored
      If a pixmap is not exportable, `glamor_gbm_bo_from_pixmap()` would fail
      and the modesettings driver would consequently fail to do its page flip,
      which both prevents Present from working and also fill up the logs with
      error messages such as:
        (EE) modeset(0): Failed to get GBM bo for flip to new front.
        (EE) modeset(0): present flip failed
      Refactor the code so that `glamor_gbm_bo_from_pixmap()` takes care of
      making the pixmap exportable.
      Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
      Signed-off-by: Yuxuan Shui yshui@hadean.com
      See-also: xorg/xserver!131
      Closes: xorg/xserver#68
      Fixes: 86b2d874 "glamor: Reallocate pixmap storage without modifiers
             if necessary"
      (cherry picked from commit 26fe29f4)
    • Olivier Fourdan's avatar
      xwayland: Check status in GBM pixmap creation · 34ad57e5
      Olivier Fourdan authored
      The current code in `xwl_glamor_gbm_create_pixmap_for_bo()` may fail in
      several cases that are not checked for:
       - `eglCreateImageKHR()` may have failed to create the image,
       - `glEGLImageTargetTexture2DOES()` may fail and set an error,
       - `glamor_set_pixmap_texture()` may fail for very large pixmaps
          because the corresponding FBO could not be created.
      Trying to upload content to a pixmap with no texture will crash Mesa,
      glamor and Xwayland, e.g.:
        XXX fail to create fbo.
        (EE) Backtrace:
        (EE) 0: Xwayland (OsSigHandler+0x29)
        (EE) 1: libpthread.so.0 (funlockfile+0x50)
        (EE) 2: libc.so.6 (__memmove_avx_unaligned_erms+0x215)
        (EE) 3: dri/i965_dri.so (_mesa_format_convert+0xab3)
        (EE) 4: dri/i965_dri.so (_mesa_texstore+0x205)
        (EE) 5: dri/i965_dri.so (store_texsubimage+0x28c)
        (EE) 6: dri/i965_dri.so (intel_upload_tex+0x13b)
        (EE) 7: dri/i965_dri.so (texture_sub_image+0x134)
        (EE) 8: dri/i965_dri.so (texsubimage_err+0x150)
        (EE) 9: dri/i965_dri.so (_mesa_TexSubImage2D+0x48)
        (EE) 10: Xwayland (glamor_upload_boxes+0x246)
        (EE) 11: Xwayland (glamor_copy+0x4d1)
        (EE) 12: Xwayland (miCopyRegion+0x96)
        (EE) 13: Xwayland (miDoCopy+0x43c)
        (EE) 14: Xwayland (glamor_copy_area+0x24)
        (EE) 15: Xwayland (damageCopyArea+0xba)
        (EE) 16: Xwayland (compCopyWindow+0x31c)
        (EE) 17: Xwayland (damageCopyWindow+0xd3)
        (EE) 18: Xwayland (miResizeWindow+0x7b7)
        (EE) 19: Xwayland (compResizeWindow+0x3a)
        (EE) 20: Xwayland (ConfigureWindow+0xa96)
        (EE) 21: Xwayland (ProcConfigureWindow+0x7d)
        (EE) 22: Xwayland (Dispatch+0x320)
        (EE) 23: Xwayland (dix_main+0x366)
        (EE) 24: libc.so.6 (__libc_start_main+0xf3)
        (EE) 25: Xwayland (_start+0x2e)
        Fatal server error:
        (EE) Caught signal 11 (Segmentation fault). Server aborting
      Check for the possible cases of failure above and fallback to the
      regular glamor pixmap creation when an error is detected.
      Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
      Closes: xorg/xserver#661
      (cherry picked from commit fc6380a1)
    • Olivier Fourdan's avatar
      xwayland: Avoid a crash on pointer enter with a grab · 6711b5c6
      Olivier Fourdan authored
      On pointer enter notification, Xwayland checks for an existing pointer
      warp with a `NULL` sprite.
      In turn, `xwl_pointer_warp_emulator_maybe_lock()` checks for an existing
      grab and the destination window using `XYToWindow()` which does not
      check for the actual sprite not being `NULL`.
      So, in some cases, when the pointer enters the surface and there is an
      existing X11 grab which is not an ownerEvents grab, Xwayland would crash
      trying to dereference the `NULL` sprite pointer:
        #0  __GI_raise ()
        #1  __GI_abort () at abort.c:79
        #2  OsAbort () at utils.c:1351
        #3  AbortServer () at log.c:879
        #4  FatalError () at log.c:1017
        #5  OsSigHandler () at osinit.c:156
        #6  OsSigHandler () at osinit.c:110
        #7  <signal handler called>
        #8  XYToWindow (pSprite=0x0, x=0, y=0) at events.c:2880
        #9  xwl_pointer_warp_emulator_maybe_lock () at xwayland-input.c:2673
        #10 pointer_handle_enter () at xwayland-input.c:434
      Avoid the crash by simply checking for the sprite being not `NULL` in
      Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
      Bugzilla: https://bugzilla.redhat.com/1708119
      (cherry picked from commit 0a074463)
  8. 30 May, 2019 1 commit
  9. 28 May, 2019 1 commit
    • Peter Hutterer's avatar
      dix: leave last.valuators alone on slave switch · 24086852
      Peter Hutterer authored
      dev->last.valuator[] is the last value given to us by the driver
      dev->valuator.axisVal[] is the last value sent to the client
      dev->last.scroll[] is the abs value of the scroll axis as given by the driver,
              used for button emulation calculation (and the remainder)
      This function updates the device's last.valuator state based on the current
      master axis state. This way, relative motion continues fluidly when switching
      between devices. Before mouse 2 comes into effect, it's valuator state is
      updated to wherever the pointer currently is so the relative event applies on
      top of that.
      This can only work for x/y axes, all other axes aren't guaranteed to have the
      same meaning and/or may not be present:
      - xtest device: no valuator 2
      - mouse: valuator 2 is horizontal scroll axis
      - tablet: valuator 2 is pressure
      Scaling the current value from the pressure range into the range for
      horizontal scrolling makes no sense. And it causes scroll jumps:
      - scroll down, last.valuator == axisVal == 20
      - xdotool click 1, the XTest device doesn't have that valuator
      - scroll up
        - updateSlaveDeviceCoords reset last.valuator to 0 (axisVal == 20)
        - DeviceClassesChangedEvent includes value 20 for the axis
        - event is processed, last.value changes from 0 to -1
        - axisVal is updated to -1, causing a jump of -21
      The same applies when we switch from tablet to mouse wheel if the pressure
      value is 0 on proximity out (basically guaranteed). So let's drop this code
      altogether and only leave the scaling for the relative x/y motion.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      (cherry picked from commit d7b1753d)
  10. 20 May, 2019 1 commit
  11. 05 Apr, 2019 2 commits
  12. 25 Mar, 2019 3 commits
  13. 21 Mar, 2019 1 commit
    • Ray Strode's avatar
      dix: ensure work queues are cleared on reset · 34553f50
      Ray Strode authored
      If the server resets, most client workqueues are cleaned up as the
      clients are killed.
      The one exception is the server's client, which is exempt from
      the killing spree.
      If that client has a queued work procedure active, it won't get
      cleared on reset.
      This commit ensures it gets cleared too.
      (cherry picked from commit 8738ce85)
      Fixes: xorg/xserver#670
  14. 25 Feb, 2019 3 commits
  15. 22 Feb, 2019 8 commits