Skip to content
Snippets Groups Projects
Commit 0777cf46 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Olivier Fourdan
Browse files

xwayland: Improve checks for confined_to on InputOnly windows


In this pretty Wine/Proton specific kludge, we try to handle confining grabs
on InputOnly windows by trying to find the InputOutput window that the pointer
would get visually confined to.

The grabbing window and the visible window come from different clients, so
we used to simply resort to the pointer focus. This is troublesome though, as
the call may happen very soon at a time that the toplevel wasn't yet mapped by
the Wayland compositor, so the pointer focus may well be out of date soon.

In these situations, it does seem that even though the confining grab happens
too early to have the wayland surface mapped, the xserver view of the WindowPtr
does already reflect the size. Use this to find out the better window to
assign the confining grab to, one whose geometry fully contains the InputOnly
window's.

Signed-off-by: default avatarCarlos Garnacho <carlosg@gnome.org>
Reviewed-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
parent f486e2fd
No related branches found
No related tags found
1 merge request!436xwayland: Improve checks for confined_to on InputOnly windows
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment