[PATCH xwayland v3 3/7] xwayland: "Accept" confineTo on InputOnly windows
Carlos Garnacho
carlosg at gnome.org
Sun May 28 13:56:18 UTC 2017
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 at gnome.org>
---
hw/xwayland/xwayland.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index 4596bf0e4..3eff3cb63 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;
--
2.13.0
More information about the xorg-devel
mailing list