paned: Don't unnecessarily redraw handle in size_allocate
authorTimm Bäder <mail@baedert.org>
Sat, 16 Jun 2018 18:13:07 +0000 (20:13 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 18 Jun 2018 15:35:02 +0000 (17:35 +0200)
We size_allocate it after all, which will redraw it.

gtk/gtkpaned.c

index 667e15a305f967f3f1f336f648f95648cfefdd85..9fcf23e1980e07b3b1ab31f026c05a1e170ca7ba 100644 (file)
@@ -1226,7 +1226,6 @@ gtk_paned_size_allocate (GtkWidget           *widget,
     {
       GtkAllocation child1_allocation;
       GtkAllocation child2_allocation;
-      GdkRectangle old_handle_pos;
       gint handle_size;
 
       gtk_widget_measure (priv->handle_widget,
@@ -1235,8 +1234,6 @@ gtk_paned_size_allocate (GtkWidget           *widget,
                           NULL, &handle_size,
                           NULL, NULL);
 
-      old_handle_pos = priv->handle_pos;
-
       if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
         {
           gint child1_width, child2_width;
@@ -1327,19 +1324,7 @@ gtk_paned_size_allocate (GtkWidget           *widget,
         }
 
       gtk_widget_size_allocate (priv->handle_widget, &priv->handle_pos, -1);
-
-      if (gtk_widget_get_mapped (widget) &&
-          (old_handle_pos.x != priv->handle_pos.x ||
-           old_handle_pos.y != priv->handle_pos.y ||
-           old_handle_pos.width != priv->handle_pos.width ||
-           old_handle_pos.height != priv->handle_pos.height))
-        {
-          gtk_widget_queue_draw (widget);
-        }
-
-
       gtk_widget_size_allocate (priv->child1, &child1_allocation, -1);
-
       gtk_widget_size_allocate (priv->child2, &child2_allocation, -1);
     }
   else