mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
core: Create passive button grab on topmost Window
With the frames client, we do no longer handle events for the frame window inside Mutter. This means we do not get events "for free" to handle focus on a just clicked frame window. This results in a background window not ending up focused if clicked on its frame. In order to fix this, make the passive button grab extend to the frame window if a window has one. This brings back focus-on-click behavior, while treating windows further as a unitary surface. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2727 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2954>
This commit is contained in:
parent
a42bc34e4d
commit
f744acefee
@ -1205,7 +1205,10 @@ meta_change_button_grab (MetaKeyBindingManager *keys,
|
||||
|
||||
meta_clutter_x11_trap_x_errors ();
|
||||
|
||||
xwindow = window->xwindow;
|
||||
if (window->frame)
|
||||
xwindow = window->frame->xwindow;
|
||||
else
|
||||
xwindow = window->xwindow;
|
||||
|
||||
/* GrabModeSync means freeze until XAllowEvents */
|
||||
if (grab)
|
||||
|
Loading…
Reference in New Issue
Block a user