summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-05-28 15:56:18 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2017-06-07 14:38:14 +1000
commitfafdb0cc9697eb53635ed1e78bec1d4cd87ab3a2 (patch)
tree2fe2d459a2a97a1f55303e7401ffea824ac8dc5d
parentc217fcb4c4640ffd2fefee63c6fcd7ea5e64b942 (diff)
xwayland: "Accept" confineTo on InputOnly windows
Of sorts, actually make it confine to the pointer focus, as the InputOnly window is entirely invisible to xwayland accounting, we don't have a xwl_window for it. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--hw/xwayland/xwayland.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 65bcb7042..993837f78 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -318,6 +318,15 @@ xwl_cursor_confined_to(DeviceIntPtr device,
}
xwl_window = xwl_window_from_window(window);
+ if (!xwl_window && xwl_seat->focus_window) {
+ /* Allow confining on InputOnly windows, but only if the geometry
+ * is the same than the focus window.
+ */
+ if (window->drawable.class == InputOnly) {
+ DebugF("Confine on InputOnly window, assuming pointer focus\n");
+ xwl_window = xwl_seat->focus_window;
+ }
+ }
if (!xwl_window)
return;