[gtk+] Fix gdk_rectangle_union calls



commit 179b8b0cbcf4f2ab66e8771d3296d30668998946
Author: Timm Bäder <mail baedert org>
Date:   Thu Apr 27 15:29:13 2017 +0200

    Fix gdk_rectangle_union calls
    
    Turns out that the destination is the last parameter, not the first one.
    This fixes the flickering in the first page of the widget-factory when
    using the expander on page 2.

 gtk/gtkbox.c     |    2 +-
 gtk/gtkframe.c   |    4 ++--
 gtk/gtkgrid.c    |    2 +-
 gtk/gtklistbox.c |    6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index d2fa3f8..9d55191 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -710,7 +710,7 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
            }
          gtk_widget_size_allocate_with_baseline (child->widget, &child_allocation, baseline);
           gtk_widget_get_clip (child->widget, &clip);
-          gdk_rectangle_union (out_clip, out_clip, &clip);
+          gdk_rectangle_union (&clip, out_clip, out_clip);
 
          i++;
        }
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 1011d00..fc4381c 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -745,7 +745,7 @@ gtk_frame_allocate (GtkCssGadget        *gadget,
 
       gtk_widget_size_allocate (priv->label_widget, &priv->label_allocation);
       gtk_widget_get_clip (priv->label_widget, &clip);
-      gdk_rectangle_union (out_clip, out_clip, &clip);
+      gdk_rectangle_union (&clip, out_clip, out_clip);
     }
 
   child = gtk_bin_get_child (GTK_BIN (widget));
@@ -753,7 +753,7 @@ gtk_frame_allocate (GtkCssGadget        *gadget,
     {
       gtk_widget_size_allocate (child, &priv->child_allocation);
       gtk_widget_get_clip (child, &clip);
-      gdk_rectangle_union (out_clip, out_clip, &clip);
+      gdk_rectangle_union (&clip, out_clip, out_clip);
     }
 }
 
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index e1a9446..6689965 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -1603,7 +1603,7 @@ gtk_grid_request_allocate_children (GtkGridRequest      *request,
 
       gtk_widget_size_allocate_with_baseline (child->widget, &child_allocation, baseline);
       gtk_widget_get_clip (child->widget, &child_clip);
-      gdk_rectangle_union (out_clip, out_clip, &child_clip);
+      gdk_rectangle_union (&child_clip, out_clip, out_clip);
     }
 }
 
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index bd4a399..b9dd5f6 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -2793,7 +2793,7 @@ gtk_list_box_allocate (GtkCssGadget        *gadget,
       header_allocation.y = child_allocation.y;
       gtk_widget_size_allocate (priv->placeholder, &header_allocation);
       gtk_widget_get_clip (priv->placeholder, &clip);
-      gdk_rectangle_union (out_clip, out_clip, &clip);
+      gdk_rectangle_union (&clip, out_clip, out_clip);
       child_allocation.y += child_min;
     }
 
@@ -2818,7 +2818,7 @@ gtk_list_box_allocate (GtkCssGadget        *gadget,
           header_allocation.y = child_allocation.y;
           gtk_widget_size_allocate (ROW_PRIV (row)->header, &header_allocation);
           gtk_widget_get_clip (ROW_PRIV (row)->header, &clip);
-          gdk_rectangle_union (out_clip, out_clip, &clip);
+          gdk_rectangle_union (&clip, out_clip, out_clip);
           child_allocation.y += child_min;
         }
 
@@ -2832,7 +2832,7 @@ gtk_list_box_allocate (GtkCssGadget        *gadget,
       ROW_PRIV (row)->height = child_allocation.height;
       gtk_widget_size_allocate (GTK_WIDGET (row), &child_allocation);
       gtk_widget_get_clip (GTK_WIDGET (row), &clip);
-      gdk_rectangle_union (out_clip, out_clip, &clip);
+      gdk_rectangle_union (&clip, out_clip, out_clip);
       child_allocation.y += child_min;
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]