mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
GtkWindow: fix an init/finalize asymmetry
Make sure we always deal with the same screen when connecting / disconnecting the theme-variant changed handler. Pointed out by Morten Welinder in https://bugzilla.gnome.org/show_bug.cgi?id=705640
This commit is contained in:
parent
3923ba1605
commit
9463c78bac
@ -5005,8 +5005,15 @@ gtk_window_finalize (GObject *object)
|
||||
}
|
||||
|
||||
if (priv->screen)
|
||||
g_signal_handlers_disconnect_by_func (priv->screen,
|
||||
gtk_window_on_composited_changed, window);
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (priv->screen,
|
||||
gtk_window_on_composited_changed, window);
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
g_signal_handlers_disconnect_by_func (gtk_settings_get_for_screen (priv->screen),
|
||||
gtk_window_on_theme_variant_changed,
|
||||
window);
|
||||
#endif
|
||||
}
|
||||
|
||||
g_free (priv->startup_id);
|
||||
|
||||
@ -5016,12 +5023,6 @@ gtk_window_finalize (GObject *object)
|
||||
priv->mnemonics_display_timeout_id = 0;
|
||||
}
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
g_signal_handlers_disconnect_by_func (gtk_settings_get_default (),
|
||||
gtk_window_on_theme_variant_changed,
|
||||
window);
|
||||
#endif
|
||||
|
||||
G_OBJECT_CLASS (gtk_window_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user