[gnome-shell] shell-tray-manager: Disconnect theme_widget signals on finalize



commit b5d3c4e165a97376907d4bd6f808a82d55c60a85
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Aug 19 20:56:15 2017 +0200

    shell-tray-manager: Disconnect theme_widget signals on finalize
    
    The theme widget passed to shell_tray_manager_manager_screen() is simply
    a means to receive style information. There is nothing which ties the two
    object's life cycles together, so it is entirely possible for the tray to
    be finalized with the widget still around - we shouldn't try to update the
    stale object on widget style changes, so make sure we properly disconnect
    the signal handler.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786526

 src/shell-tray-manager.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/shell-tray-manager.c b/src/shell-tray-manager.c
index a1a6b3a..c58e951 100644
--- a/src/shell-tray-manager.c
+++ b/src/shell-tray-manager.c
@@ -223,8 +223,9 @@ shell_tray_manager_manage_screen (ShellTrayManager *manager,
 
   na_tray_manager_manage_screen (manager->priv->na_manager, gdk_screen);
 
-  g_signal_connect (theme_widget, "style-changed",
-                    G_CALLBACK (shell_tray_manager_style_changed), manager);
+  g_signal_connect_object (theme_widget, "style-changed",
+                           G_CALLBACK (shell_tray_manager_style_changed),
+                           manager, 0);
   shell_tray_manager_style_changed (theme_widget, manager);
 }
 


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