mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-06 09:18:18 +02:00
xwayland: Try harder to find a top-level for root grabs
The commit referenced below partially resolved an issue with grabs being made on the root window. Unfortunately it assumes that the application uses the same client for all windows. VMware Workstation uses nested windows for each VM, each of which runs its own process with this own client. Theses windows are managed by the GUI which is the top level for the application and maps the windows based on which tab is selected. Because the VM windows issue a grab on the root window and don't share the same client as the GUI, grabs don't work properly with global shortcut inhibition being completely broken. Getting the parent top-level of the nested windows fixes this issue. Fixes:c7730cfe55("xwayland: Translate keyboard grabs on the root window") Signed-off-by: Ian Forbes <ian.forbes@broadcom.com> (cherry picked from commitafc8b781d8) Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2076>
This commit is contained in:
parent
dfb1d1e202
commit
97b1061a4f
1 changed files with 7 additions and 3 deletions
|
|
@ -1599,9 +1599,13 @@ find_toplevel_callback(void *resource, XID id, void *user_data)
|
|||
WindowPtr window = resource;
|
||||
WindowPtr *toplevel = user_data;
|
||||
|
||||
/* Pick the first realized toplevel we find */
|
||||
if (*toplevel == NullWindow && window->realized && xwl_window_is_toplevel(window))
|
||||
*toplevel = window;
|
||||
while (*toplevel == NullWindow && window) {
|
||||
/* Pick the first realized toplevel we find */
|
||||
if (window->realized && xwl_window_is_toplevel(window))
|
||||
*toplevel = window;
|
||||
else
|
||||
window = window->parent;
|
||||
}
|
||||
}
|
||||
|
||||
static WindowPtr
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue