[gnome-flashback/gnome-3-22] input-settings: store monitors-changed signal id



commit 1bf871ada5826ba0058cf109522a9151391224d9
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Jul 21 18:34:54 2017 +0300

    input-settings: store monitors-changed signal id
    
    Otherwise we will never disconnect signal and that can lead
    to segfault.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785227

 .../libinput-settings/gf-input-settings.c          |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gnome-flashback/libinput-settings/gf-input-settings.c 
b/gnome-flashback/libinput-settings/gf-input-settings.c
index 2b8dcce..abe7eaa 100644
--- a/gnome-flashback/libinput-settings/gf-input-settings.c
+++ b/gnome-flashback/libinput-settings/gf-input-settings.c
@@ -1363,6 +1363,8 @@ gf_input_settings_set_display_config (GfInputSettings        *settings,
     return;
 
   settings->monitor_manager = g_object_ref (monitor_manager);
-  g_signal_connect (settings->monitor_manager, "monitors-changed",
-                    G_CALLBACK (monitors_changed_cb), settings);
+
+  settings->monitors_changed_id =
+    g_signal_connect (settings->monitor_manager, "monitors-changed",
+                      G_CALLBACK (monitors_changed_cb), settings);
 }


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