[gtk+] window: Validate style context before first allocation



commit d22a632b545fada65320dfdbe2c7a7914bcefdf7
Author: Benjamin Otte <otte redhat com>
Date:   Wed May 2 01:43:52 2012 +0200

    window: Validate style context before first allocation
    
    When we don't do that, we completely botch sizing popups. Not good.
    
    Fixes remaining failing reftests

 gtk/gtkwindow.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 3b34ec8..1cdad4e 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -47,6 +47,7 @@
 #include "gtkwidgetprivate.h"
 #include "gtkcontainerprivate.h"
 #include "gtkintl.h"
+#include "gtkstylecontextprivate.h"
 #include "gtktypebuiltins.h"
 #include "a11y/gtkwindowaccessible.h"
 
@@ -4807,6 +4808,10 @@ gtk_window_show (GtkWidget *widget)
 
   need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
 
+  _gtk_style_context_validate (gtk_widget_get_style_context (widget),
+                               g_get_monotonic_time (),
+                               0);
+
   if (need_resize)
     {
       GtkWindowGeometryInfo *info = gtk_window_get_geometry_info (window, TRUE);



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