From 2d6955285c2afa60460424c1ed0c32d49a08a0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 16 Jun 2018 20:58:50 +0200 Subject: [PATCH] paned: Allocation x/y are always 0 The allocation position we get passed to size_allocate is always 0/0 these days. --- gtk/gtkpaned.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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);