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
This commit is contained in:
Florian Müllner 2017-08-19 20:56:15 +02:00
parent 5c3de58279
commit b5d3c4e165

View File

@ -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);
}