[mutter/wip/carlosg/xwayland-on-demand: 5/7] x11: Add "closing" flag to MetaX11Display



commit ffc4c8940f6393de282b93ebd90fa0c9608d3fa3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jun 14 17:25:10 2019 +0200

    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

 src/x11/meta-x11-display-private.h | 2 ++
 src/x11/meta-x11-display.c         | 2 ++
 2 files changed, 4 insertions(+)
---
diff --git a/src/x11/meta-x11-display-private.h b/src/x11/meta-x11-display-private.h
index 1b38e3c30..8b19b5c4c 100644
--- a/src/x11/meta-x11-display-private.h
+++ b/src/x11/meta-x11-display-private.h
@@ -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
    */
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
index 0fb71a260..6729cb9b6 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]