[gtk+/wip/clip: 5/6] xxx: clip support



commit cc1d28ad50e9e2c0af8b94666bf32815919f2812
Author: Benjamin Otte <otte redhat com>
Date:   Wed May 21 19:19:44 2014 +0200

    xxx: clip support

 gtk/gtkwidget.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 176ae23..b5bc1b8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5660,8 +5660,17 @@ gtk_widget_size_allocate_with_baseline (GtkWidget     *widget,
   /* Size allocation is god... after consulting god, no further requests or allocations are needed */
   priv->alloc_needed = FALSE;
 
-  if (!priv->supports_clip)
-    priv->clip = priv->allocation;
+  if (priv->supports_clip)
+    {
+      size_changed |= (old_clip.width != priv->clip.width ||
+                       old_clip.height != priv->clip.height);
+      position_changed |= (old_clip.x != priv->clip.x ||
+                          old_clip.y != priv->clip.y);
+    }
+  else
+    {
+      priv->clip = priv->allocation;
+    }
 
   if (gtk_widget_get_mapped (widget) && priv->redraw_on_alloc)
     {


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