summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-05-28 15:56:18 +0200
committerAdam Jackson <ajax@redhat.com>2017-09-25 15:34:10 -0400
commit0e5b08f2eef946e9d9d071f0a79ead379419d8a7 (patch)
tree352d9455ad1be16039bf6fdb6410a9cc32a0d117 /hw
parent420f77a1ba8bfbbf8c06f6dd57e9ee36124b7360 (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> (cherry picked from commit fafdb0cc9697eb53635ed1e78bec1d4cd87ab3a2)
Diffstat (limited to 'hw')
-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 33c784fd6..4ccea1a1f 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -224,6 +224,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;