window: Validate style context before first allocation

When we don't do that, we completely botch sizing popups. Not good.

Fixes remaining failing reftests
This commit is contained in:
Benjamin Otte
2012-05-02 01:43:52 +02:00
parent 40915d9a34
commit d22a632b54

View File

@ -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);