x11: Add "closing" flag to MetaX11Display

So code not directly in dispose() can know to avoid certain things
when the X11 display is about to close.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/709
This commit is contained in:
Carlos Garnacho 2019-06-14 17:25:10 +02:00 committed by Carlos Garnacho
parent 123b40105d
commit 879f5f0dbb
2 changed files with 4 additions and 0 deletions

View File

@ -144,6 +144,8 @@ struct _MetaX11Display
guint keys_grabbed : 1;
guint closing : 1;
/* we use property updates as sentinels for certain window focus events
* to avoid some race conditions on EnterNotify events
*/

View File

@ -129,6 +129,8 @@ meta_x11_display_dispose (GObject *object)
{
MetaX11Display *x11_display = META_X11_DISPLAY (object);
x11_display->closing = TRUE;
meta_x11_startup_notification_release (x11_display);
meta_prefs_remove_listener (prefs_changed_callback, x11_display);