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 <[email protected]>
---
 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

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to