[mutter/gnome-3-34] display: Add 'closing' signal



commit 3564b0df4a97afb1ebc67718a2903d00d85cb539
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Nov 1 13:14:39 2019 +0100

    display: Add 'closing' signal
    
    Emitted when the MetaDisplay is closing. Meant for clean up that depends
    on things that will be torn down during closing.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/912

 src/core/display.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/core/display.c b/src/core/display.c
index 05c2a64b8..7f0b7f95e 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -156,6 +156,7 @@ enum
   SHOWING_DESKTOP_CHANGED,
   RESTACKED,
   WORKAREAS_CHANGED,
+  CLOSING,
   LAST_SIGNAL
 };
 
@@ -493,6 +494,12 @@ meta_display_class_init (MetaDisplayClass *klass)
                   G_SIGNAL_RUN_LAST,
                   0, NULL, NULL, NULL,
                   G_TYPE_NONE, 0);
+  display_signals[CLOSING] =
+    g_signal_new ("closing",
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST,
+                  0, NULL, NULL, NULL,
+                  G_TYPE_NONE, 0);
 
   g_object_class_install_property (object_class,
                                    PROP_FOCUS_WINDOW,
@@ -971,6 +978,8 @@ meta_display_close (MetaDisplay *display,
 
   display->closing += 1;
 
+  g_signal_emit (display, display_signals[CLOSING], 0);
+
   meta_compositor_unmanage (display->compositor);
 
   meta_display_unmanage_windows (display, timestamp);


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