static void
gtk_expander_realize (GtkWidget *widget)
{
- GtkAllocation allocation;
+ GtkAllocation title_allocation;
GtkExpanderPrivate *priv;
GdkWindow *window;
GdkWindowAttr attributes;
priv = GTK_EXPANDER (widget)->priv;
- gtk_widget_get_allocation (widget, &allocation);
+ gtk_css_gadget_get_border_allocation (priv->title_gadget, &title_allocation, NULL);
attributes.window_type = GDK_WINDOW_CHILD;
- attributes.x = allocation.x;
- attributes.y = allocation.y;
- attributes.width = allocation.width;
- attributes.height = allocation.height;
+ attributes.x = title_allocation.x;
+ attributes.y = title_allocation.y;
+ attributes.width = title_allocation.width;
+ attributes.height = title_allocation.height;
attributes.wclass = GDK_INPUT_ONLY;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_BUTTON_PRESS_MASK