[gtk+] widget: Correctly handle which widgets to include in the clip



commit d879a1360052df1ae504258c178b130f66cea47b
Author: Benjamin Otte <otte redhat com>
Date:   Thu Jan 22 14:33:26 2015 +0100

    widget: Correctly handle which widgets to include in the clip
    
    Previously, we would not include any child widget on the first
    allocation, which happens right after realize(), but before map(). No
    widget is drawable at that point.

 gtk/gtkwidget.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 73001fd..575db60 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15578,7 +15578,8 @@ union_with_clip (GtkWidget *widget,
 {
   GtkAllocation widget_clip;
 
-  if (!gtk_widget_is_drawable (widget))
+  if (!gtk_widget_is_visible (widget) ||
+      !gtk_widget_get_child_visible (widget))
     return;
 
   gtk_widget_get_clip (widget, &widget_clip);


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