xserver/hw/xwayland
Olivier Fourdan b97b459c06 xwayland: Update sprite prior to clearing the focus window
Xwayland has its own XYToWindow() handler to account for the case when
the pointer leaves an X11 surface to enter another Wayland native window
(which of course are unknown to Xwayland).

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, CheckMotion() will call back into the XYToWindow() handler,
which will then pretend the window has entered the root window, and that
may cause the wrong cursor to be applied.

To avoid the issue, change the order we do things, by calling
CheckMotion() first prior to clear up the internal focus window so that
the first call to XYToWindow() will return the correct X11 window so we
get to update the cursor correctly.

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/1915>
2025-05-16 10:02:53 +00:00
..
desktop xwayland: Use "-decorate" if available 2024-03-18 23:19:59 +00:00
man man pages: use .BR to mark up man page references 2025-03-29 13:36:54 -07:00
.gitignore xwayland: Add wp_viewport wayland extension support 2019-10-12 12:19:14 +02:00
drm.xml wayland: Sync drm.xml with Mesa 2017-07-05 10:13:04 -04:00
meson.build pkgconfig files: Add URL 2025-03-09 07:32:28 +00:00
xwayland-cursor.c mi: unexport miPointerInitialize() 2025-02-06 14:38:05 +00:00
xwayland-cursor.h xwayland: Add xwl_cursor_clear_frame_cb() 2021-10-25 12:05:42 +00:00
xwayland-cvt.c xwayland: Keep the CVT timings for non-standard modes 2023-05-15 10:33:21 +02:00
xwayland-cvt.h xwayland: Move Xwayland CVT declaration 2019-12-20 16:19:01 +01:00
xwayland-dmabuf.c treewide: replace xnfrealloc() calls to XNFrealloc() 2024-07-26 23:41:33 +00:00
xwayland-dmabuf.h xwayland: Move dmabuf code to its own source file 2024-03-14 15:00:46 +01:00
xwayland-drm-lease.c os: unexport ResetCurrentRequest() 2025-02-18 10:53:45 +00:00
xwayland-drm-lease.h Xwayland: implement drm-lease-v1 2021-12-07 10:02:29 +00:00
xwayland-glamor-gbm.c xwayland/glamor: Disable GLAMOR after GBM cleanup 2025-02-04 11:46:25 +01:00
xwayland-glamor-gbm.h xwayland/glamor/gbm: Copy explicit sync code to GLAMOR/GBM 2024-07-04 08:13:36 +00:00
xwayland-glamor-xv.c xv: unexport XvFreeAdaptor() 2024-07-26 23:51:13 +00:00
xwayland-glamor.c xwayland/glamor/gbm: Don't close fence_fd after xwl_glamor_wait_fence 2024-10-22 16:26:09 +00:00
xwayland-glamor.h xwayland: Pass xwl_window to xwl_glamor_dri3_syncobj_passthrough 2024-04-10 08:55:08 +00:00
xwayland-input.c xwayland: Update sprite prior to clearing the focus window 2025-05-16 10:02:53 +00:00
xwayland-input.h xwayland: Use xwl_window for tracking focus/touch 2024-04-10 08:55:08 +00:00
xwayland-output.c xwayland: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
xwayland-output.h xwayland: Do not remove output on withdraw if leased 2024-04-30 09:13:34 +02:00
xwayland-pixmap.c xwayland: Add xwl_pixmap_get_wl_buffer helper 2024-01-22 14:14:05 +00:00
xwayland-pixmap.h xwayland: Replace window pixmap as needed for drawing operation 2024-03-06 17:12:54 +01:00
xwayland-present.c xwayland/present: Check allow_commits in xwl_present_flip 2024-10-30 10:56:31 +00:00
xwayland-present.h xwayland: Only ignore manual redirection by clients for surface window 2024-06-24 08:26:46 +00:00
xwayland-screen.c os: unexport CloseWellKnownConnections() 2025-02-18 10:53:45 +00:00
xwayland-screen.h xwayland: Add xdg-system-bell support 2024-12-02 08:55:34 +00:00
xwayland-shm.c os: move os_move_fd() out of public API 2024-03-09 17:12:46 +00:00
xwayland-shm.h xwayland: Move SHM declarations to their own header 2019-12-20 16:19:01 +01:00
xwayland-types.h xwayland/window-buffers: Promote xwl_window_buffer 2024-07-04 08:13:36 +00:00
xwayland-vidmode.c drop obsolete HAVE_DIX_CONFIG_H 2024-10-10 13:38:31 +00:00
xwayland-vidmode.h xwayland: Move Xwayland vidmode declaration 2019-12-20 16:19:01 +01:00
xwayland-window-buffers.c xwayland: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
xwayland-window-buffers.h xwayland/window-buffers: optionally force disposal 2024-07-04 08:26:23 +00:00
xwayland-window.c xwayland: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
xwayland-window.h include: split out non-exported stuff from property.h 2024-09-02 17:50:47 +00:00
xwayland-xtest.c xwayland: prevent potential null pointer dereference 2024-10-11 10:00:39 +08:00
xwayland-xtest.h xwayland: Fallback to plain XTEST if EI does not work 2023-06-26 13:19:19 +02:00
xwayland.c xwayland: no need to use WriteReplyToClient() 2025-04-07 07:47:30 +00:00