[gtk+/wip/otte/queue-resize: 9/32] widget: Use gtk_widget_queue_allocate() when clip changes



commit c5c99faa44deb12f536aaf3f4516d9b6d70070f9
Author: Benjamin Otte <otte redhat com>
Date:   Wed Sep 16 23:16:44 2015 +0200

    widget: Use gtk_widget_queue_allocate() when clip changes
    
    There's no need to queue a full resize there.

 gtk/gtkwidget.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 2e8239e..06b1de9 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8150,16 +8150,19 @@ gtk_widget_real_style_updated (GtkWidget *widget)
 
       if (widget->priv->anchored)
         {
-          static GtkBitmask *affects_size, *affects_redraw;
+          static GtkBitmask *affects_size, *affects_redraw, *affects_allocate;
 
           if (G_UNLIKELY (affects_size == NULL))
             {
-              affects_size = _gtk_css_style_property_get_mask_affecting (GTK_CSS_AFFECTS_SIZE | 
GTK_CSS_AFFECTS_CLIP);
+              affects_size = _gtk_css_style_property_get_mask_affecting (GTK_CSS_AFFECTS_SIZE);
+              affects_allocate = _gtk_css_style_property_get_mask_affecting (GTK_CSS_AFFECTS_CLIP);
               affects_redraw = _gtk_css_style_property_get_mask_affecting (GTK_CSS_AFFECTS_REDRAW);
             }
 
           if (changes == NULL || _gtk_bitmask_intersects (changes, affects_size))
             gtk_widget_queue_resize (widget);
+          else if (_gtk_bitmask_intersects (changes, affects_allocate))
+            gtk_widget_queue_allocate (widget);
           else if (_gtk_bitmask_intersects (changes, affects_redraw))
             gtk_widget_queue_draw (widget);
         }


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