[PATCH xserver v2 2/7] xwayland: Allow pointer warp on the root window

Carlos Garnacho carlosg at gnome.org
Mon Feb 20 22:46:20 UTC 2017


Of sorts, as we can't honor pointer warping across the whole root window
coordinates, peek the pointer focus in this case.

Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
---
 v2: Check that requester and focus window clients are the same

 hw/xwayland/xwayland.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 9e1ecf8..9e24011 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -180,6 +180,11 @@ xwl_cursor_warped_to(DeviceIntPtr device,
         xwl_seat = xwl_screen_get_default_seat(xwl_screen);
 
     xwl_window = xwl_window_from_window(window);
+    if (!xwl_window && !window->parent &&
+        client == wClient(xwl_seat->focus_window->window)) {
+        DebugF("Warp on root window, assuming pointer focus\n");
+        xwl_window = xwl_seat->focus_window;
+    }
     if (!xwl_window)
         return;
 
-- 
2.9.3



More information about the xorg-devel mailing list