mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
expander: Call set_realized() later
Widgets should only call set_realized() after having created and registered their GDK windows. In this case, the creation of the style context (or more exactly: figuring out the scale factor for it) requires knowing if the widget is already realized. Which it isn't. https://bugzilla.gnome.org/show_bug.cgi?id=726717
This commit is contained in:
parent
6726f37309
commit
b20d49fc04
@ -527,8 +527,6 @@ gtk_expander_realize (GtkWidget *widget)
|
||||
|
||||
priv = GTK_EXPANDER (widget)->priv;
|
||||
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
|
||||
get_expander_bounds (GTK_EXPANDER (widget), &expander_rect);
|
||||
@ -567,6 +565,8 @@ gtk_expander_realize (GtkWidget *widget)
|
||||
priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gtk_widget_register_window (widget, priv->event_window);
|
||||
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user