paned: Allocation x/y are always 0
authorTimm Bäder <mail@baedert.org>
Sat, 16 Jun 2018 18:58:50 +0000 (20:58 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 18 Jun 2018 15:35:03 +0000 (17:35 +0200)
The allocation position we get passed to size_allocate is always 0/0
these days.

gtk/gtkpaned.c

index 997c470571b4fbe5a9a7b6ea5556d47002e6451f..464110ce98d78c47938640e295950dd7e35a53cc 100644 (file)
@@ -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);