From 9d66cfd3f65a3a5f34cbb8e657e190eaa46a9f42 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Thu, 24 Jun 2010 13:56:12 +0000 Subject: [PATCH] fixes #5124, window now centered before content rendering if the content does not affect the size svn changeset:13918/svn branch:6.4 --- src/com/vaadin/terminal/gwt/client/ui/VWindow.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index 4cf3f5fc80..82589f22c9 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -349,6 +349,17 @@ public class VWindow extends VOverlay implements Container, ScrollListener { setNaturalWidth(); } + if (!dynamicWidth && !dynamicHeight + && uidl.getBooleanAttribute("center")) { + /* + * Iff size is specified we can center the window at this point. By + * doing it early we can avoid some flickering in some browsers. see + * #5124 + */ + centered = true; + center(); + } + layout.updateFromUIDL(childUidl, client); if (!dynamicHeight && layoutRelativeWidth) { /* -- 2.39.5