Skip to content

Commit

Permalink
xwayland: "Accept" confineTo on InputOnly windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
garnacho authored and whot committed Jun 7, 2017
1 parent c217fcb commit fafdb0c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hw/xwayland/xwayland.c
Expand Up @@ -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;

Expand Down

0 comments on commit fafdb0c

Please sign in to comment.