mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 04:31:09 +00:00
Window: Do not connect to NULL screen in init()
Do not connect to get_settings_for_screen() if we have no screen… Use g_signal_connect(), not connect_object(), to match how set_screen() makes this same connection, and how finalize() already disconnects it. https://bugzilla.gnome.org/show_bug.cgi?id=705640
This commit is contained in:
parent
6609173779
commit
6984d0847b
@ -1858,9 +1858,10 @@ gtk_window_init (GtkWindow *window)
|
||||
gtk_window_update_debugging ();
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
g_signal_connect_object (gtk_settings_get_for_screen (priv->screen),
|
||||
"notify::gtk-application-prefer-dark-theme",
|
||||
G_CALLBACK (gtk_window_on_theme_variant_changed), window, 0);
|
||||
if (priv->screen)
|
||||
g_signal_connect (gtk_settings_get_for_screen (priv->screen),
|
||||
"notify::gtk-application-prefer-dark-theme",
|
||||
G_CALLBACK (gtk_window_on_theme_variant_changed), window);
|
||||
#endif
|
||||
|
||||
widget_node = gtk_widget_get_css_node (GTK_WIDGET (window));
|
||||
|
Loading…
Reference in New Issue
Block a user