Commit f34d0d6f authored by Benjamin Otte's avatar Benjamin Otte

overlay: Create child window before setting parent

Otherwise, the window will not be used when set_parent() maps the child.
parent 6ed59187
......@@ -625,10 +625,14 @@ gtk_overlay_add_overlay (GtkOverlay *overlay,
child = g_slice_new0 (GtkOverlayChild);
child->widget = widget;
gtk_widget_set_parent (widget, GTK_WIDGET (overlay));
priv->children = g_slist_append (priv->children, child);
if (gtk_widget_get_realized (GTK_WIDGET (overlay)))
child->window = gtk_overlay_create_child_window (overlay, widget);
{
child->window = gtk_overlay_create_child_window (overlay, widget);
gtk_widget_set_parent (widget, GTK_WIDGET (overlay));
}
else
gtk_widget_set_parent (widget, GTK_WIDGET (overlay));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment