core: Pass MetaWindow on passive button grab machinery

In practical effects the passed Window is always window->xwindow,
so pass the MetaWindow and get the better X11 Window deep in the
call stack.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2954>
This commit is contained in:
Carlos Garnacho
2023-04-12 10:21:54 +02:00
parent e30abee5a2
commit a42bc34e4d
4 changed files with 27 additions and 22 deletions

View File

@ -5194,7 +5194,7 @@ meta_window_set_focused_internal (MetaWindow *window,
meta_display_ungrab_focus_window_button (window->display, window);
/* Since we ungrab with XIAnyModifier above, all button
grabs go way so we need to re-grab the window buttons. */
meta_display_grab_window_buttons (window->display, window->xwindow);
meta_display_grab_window_buttons (window->display, window);
}
g_signal_emit (window, window_signals[FOCUS], 0);