overlay: Properly allocate the child upon addition

This ensures that after addition the child gets assigned the proper
allocation and the child window is properly shown/hidden.
This commit is contained in:
Benjamin Otte 2011-12-08 00:20:49 +01:00
parent 003d80dbea
commit 6454c718dd

View File

@ -628,6 +628,7 @@ gtk_overlay_add_overlay (GtkOverlay *overlay,
{
child->window = gtk_overlay_create_child_window (overlay, widget);
gtk_widget_set_parent (widget, GTK_WIDGET (overlay));
gtk_overlay_child_allocate (overlay, child);
}
else
gtk_widget_set_parent (widget, GTK_WIDGET (overlay));