core: Sync after issuing key/button passive grabs

Try to collect any possible errors in place, instead of maybe
delegating asynchronous errors to maybe another error handler.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2864>
This commit is contained in:
Carlos Garnacho 2023-03-03 20:49:12 +01:00 committed by Marge Bot
parent a7e89453a7
commit 2a182b91fb

View File

@ -1213,6 +1213,8 @@ meta_change_button_grab (MetaKeyBindingManager *keys,
META_VIRTUAL_CORE_POINTER_ID,
button, xwindow, mods->len, (XIGrabModifiers *)mods->data);
XSync (xdisplay, False);
meta_clutter_x11_untrap_x_errors ();
g_array_free (mods, TRUE);
@ -1459,6 +1461,8 @@ meta_change_keygrab (MetaKeyBindingManager *keys,
mods->len, (XIGrabModifiers *)mods->data);
}
XSync (xdisplay, False);
meta_clutter_x11_untrap_x_errors ();
g_array_free (mods, TRUE);