diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index 0380e6bae6..c99c9663d9 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -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