From: Timm Bäder Date: Sat, 16 Jun 2018 18:58:50 +0000 (+0200) Subject: paned: Allocation x/y are always 0 X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~145 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2d6955285c2afa60460424c1ed0c32d49a08a0ee;p=gtk4.git paned: Allocation x/y are always 0 The allocation position we get passed to size_allocate is always 0/0 these days. --- diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 997c470571..464110ce98 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -1186,12 +1186,11 @@ static void flip_child (const GtkAllocation *allocation, GtkAllocation *child_pos) { - gint x, width; + int width; - x = allocation->x; width = allocation->width; - child_pos->x = 2 * x + width - child_pos->x - child_pos->width; + child_pos->x = width - child_pos->x - child_pos->width; } static void @@ -1257,8 +1256,8 @@ gtk_paned_size_allocate (GtkWidget *widget, child1_allocation.height = child2_allocation.height = allocation->height; child1_allocation.width = MAX (1, priv->child1_size); - child1_allocation.x = allocation->x; - child1_allocation.y = child2_allocation.y = allocation->y; + child1_allocation.x = 0; + child1_allocation.y = child2_allocation.y = 0; child2_allocation.x = child1_allocation.x + priv->child1_size + handle_size; child2_allocation.width = MAX (1, allocation->width - priv->child1_size - handle_size); @@ -1309,8 +1308,8 @@ gtk_paned_size_allocate (GtkWidget *widget, child1_allocation.width = child2_allocation.width = allocation->width; child1_allocation.height = MAX (1, priv->child1_size); - child1_allocation.x = child2_allocation.x = allocation->x; - child1_allocation.y = allocation->y; + child1_allocation.x = child2_allocation.x = 0; + child1_allocation.y = 0; child2_allocation.y = child1_allocation.y + priv->child1_size + handle_size; child2_allocation.height = MAX (1, allocation->height - child2_allocation.y);