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

Carlos Garnacho carlosg at gnome.org
Sat Nov 12 16:25:17 UTC 2016


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>
---
 hw/xwayland/xwayland.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index c277870..ff0e2e5 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -180,6 +180,10 @@ 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) {
+        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