xserver/hw
Olivier Fourdan 8cb078f8b6 xwayland: Do not pretend leaving the X11 surface if buttons are down
Xwayland has its own XYToWindow() handler to account for the case when
the pointer leaves an X11 surface to enter another Wayland native
window.

When that occurs, Xwayland will treat it as if the pointer had entered
the root window so that the X11 clients receive an appropriate leave
event.

When the pointer leaves the X11 surface, Xwayland will call
CheckMotion() to update the sprite coordinates and possibly the cursor.

However, if we left the surface with a button down, it means the wayland
compositor has grabbed the pointer so we will not get button release
events from the compositor.

Once the button is released, Xwayland will get a pointer enter event from
the compositor, and Xwayland will clear up the buttons pressed.

But that might confuse Xwayland in thinking the pointer has crossed the
windows and leave the wrong cursor showing in the X11 surface.

To avoid the issue, if buttons are down, do not pretend the cursor has
left the X11 surface for the root window.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1811
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2008>
2025-06-05 07:29:03 +00:00
..
kdrive Xephyr.man: Use \- to get ASCII hyphens instead of Unicode dashes 2025-05-31 15:15:13 -07:00
vfb man pages: remove extraneous PP macros 2025-05-31 15:01:49 -07:00
xfree86 man pages: remove extraneous PP macros 2025-05-31 15:01:49 -07:00
xnest Xnest: use authorative declarations from X11/XKBlib.h 2025-02-28 17:27:05 +00:00
xquartz man pages: remove extraneous PP macros 2025-05-31 15:01:49 -07:00
xwayland xwayland: Do not pretend leaving the X11 surface if buttons are down 2025-06-05 07:29:03 +00:00
xwin XWin.man: fix typos in font change escapes 2025-05-31 15:06:23 -07:00
meson.build meson.build: print a summary of the DDX to build 2025-03-24 03:05:35 +00:00