window = gdk_window_new (gtk_widget_get_window (widget),
&attributes, attributes_mask);
- gdk_window_set_user_data (window, overlay);
+ gtk_widget_register_window (widget, window);
gtk_style_context_set_background (gtk_widget_get_style_context (widget), window);
gtk_widget_set_parent_window (child, window);
child = children->data;
if (child->window == NULL)
- child->window = gtk_overlay_create_child_window (overlay, child->widget);
+ {
+ child->window = gtk_overlay_create_child_window (overlay, child->widget);
+ gtk_overlay_child_allocate (overlay, child);
+ }
}
}
child = children->data;
gtk_widget_set_parent_window (child->widget, NULL);
- gdk_window_set_user_data (child->window, NULL);
+ gtk_widget_unregister_window (widget, child->window);
gdk_window_destroy (child->window);
child->window = NULL;
}
{
if (child->window != NULL)
{
- gdk_window_set_user_data (child->window, NULL);
+ gtk_widget_unregister_window (GTK_WIDGET (container), child->window);
gdk_window_destroy (child->window);
}
* GtkOverlay::get-child-position:
* @overlay: the #GtkOverlay
* @widget: the child widget to position
- * @allocation: (out): return location for the allocation
+ * @allocation: (out caller-allocates): return location for the allocation
*
* The ::get-child-position signal is emitted to determine
* the position and size of any overlay child widgets. A