]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #5124, window now centered before content rendering if the content does not...
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 24 Jun 2010 13:56:12 +0000 (13:56 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 24 Jun 2010 13:56:12 +0000 (13:56 +0000)
svn changeset:13918/svn branch:6.4

src/com/vaadin/terminal/gwt/client/ui/VWindow.java

index 4cf3f5fc80c18a4d7ecc43a83d95679d74f10ffd..82589f22c92442a771c846f57735e716955e3fe2 100644 (file)
@@ -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) {
             /*