[gtk+] widget: Queue an allocate on hide



commit 1f01b8d52ae869dac49b75220db8f739b5971e03
Author: Benjamin Otte <otte redhat com>
Date:   Tue Nov 3 18:53:45 2015 +0100

    widget: Queue an allocate on hide
    
    This makes sure that hidden widgets always have priv->alloc_needed set
    on them.
    
    The constructor sets that flag, so we want to have it back when we
    revert to this state.
    
    This fixes GtkWindow skipping a size_allocate() when reshowing a
    previously hidden window and thereby not updating its allocation and
    clip. And that in turn would lead to draws not happening and us beig
    left with a black window.

 gtk/gtkwidget.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 42bf421..50bf5fc 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4863,6 +4863,8 @@ gtk_widget_hide (GtkWidget *widget)
       if (parent)
        gtk_widget_queue_resize (parent);
 
+      gtk_widget_queue_allocate (widget);
+
       gtk_widget_pop_verify_invariants (widget);
       g_object_unref (widget);
     }


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