overlay: Fix child widget allocation

Just adding the overlay's own position is wrong now.
This commit is contained in:
Timm Bäder 2017-07-20 12:40:46 +02:00
parent c3176ed302
commit e92eebb434

View File

@ -93,17 +93,12 @@ gtk_overlay_compute_child_allocation (GtkOverlay *overlay,
GtkOverlayChild *child,
GtkAllocation *widget_allocation)
{
GtkAllocation allocation, overlay_allocation;
GtkAllocation allocation;
gboolean result;
g_signal_emit (overlay, signals[GET_CHILD_POSITION],
0, child->widget, &allocation, &result);
gtk_widget_get_allocation (GTK_WIDGET (overlay), &overlay_allocation);
allocation.x += overlay_allocation.x;
allocation.y += overlay_allocation.y;
widget_allocation->x = allocation.x;
widget_allocation->y = allocation.y;
widget_allocation->width = allocation.width;