mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
widget: Set up signals after initializing style context
Otherwise, signals would be emitted on semi set up style context which would then cause crashes when the signal handlers tried to use them. https://bugzilla.gnome.org/show_bug.cgi?id=662023
This commit is contained in:
parent
9d1688680c
commit
5d57981184
@ -14119,9 +14119,6 @@ gtk_widget_get_style_context (GtkWidget *widget)
|
||||
"direction", gtk_widget_get_direction (widget),
|
||||
NULL);
|
||||
|
||||
g_signal_connect (widget->priv->context, "changed",
|
||||
G_CALLBACK (style_context_changed), widget);
|
||||
|
||||
screen = gtk_widget_get_screen (widget);
|
||||
|
||||
if (screen)
|
||||
@ -14131,6 +14128,9 @@ gtk_widget_get_style_context (GtkWidget *widget)
|
||||
if (priv->parent)
|
||||
gtk_style_context_set_parent (priv->context,
|
||||
gtk_widget_get_style_context (priv->parent));
|
||||
|
||||
g_signal_connect (widget->priv->context, "changed",
|
||||
G_CALLBACK (style_context_changed), widget);
|
||||
}
|
||||
|
||||
return widget->priv->context;
|
||||
|
Loading…
Reference in New Issue
Block a user