diff options
author | Benjamin Otte <otte@redhat.com> | 2012-05-02 01:43:52 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-05-02 02:00:11 +0200 |
commit | d22a632b545fada65320dfdbe2c7a7914bcefdf7 (patch) | |
tree | 7f46be2ed289e753b99018901800ebe36f86232f | |
parent | 40915d9a3445324ded88d0b35a4896de526f7d96 (diff) | |
download | gtk+-d22a632b545fada65320dfdbe2c7a7914bcefdf7.tar.gz |
window: Validate style context before first allocation
When we don't do that, we completely botch sizing popups. Not good.
Fixes remaining failing reftests
-rw-r--r-- | gtk/gtkwindow.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 3b34ec8100..1cdad4e043 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); |