fixes Bug 525 - correct initial frame size
authorcharlie <charlie@xwt.org>
Mon, 12 Apr 2004 15:47:43 +0000 (15:47 +0000)
committercharlie <charlie@xwt.org>
Mon, 12 Apr 2004 15:47:43 +0000 (15:47 +0000)
darcs-hash:20040412154743-b408a-3703226ed3ede1790e4041bcf8659d0818a965cb.gz

src/org/ibex/graphics/Surface.java

index b9207bb..e6c5c4e 100644 (file)
@@ -51,6 +51,7 @@ public abstract class Surface extends PixelBuffer implements Task {
     public int newmousey = -1;                         ///< y position of the mouse, in real time; this lets us collapse Move's
     public boolean minimized = false;                  ///< True iff this surface is minimized, in real time
     public boolean maximized = false;                  ///< True iff this surface is maximized, in real time
+    public boolean unrendered = true;                  ///< True iff this surface has not yet been rendered
     DirtyList dirtyRegions = new DirtyList();          ///< Dirty regions on the surface
 
     // Used For Simulating Clicks and DoubleClicks /////////////////////////////////////////////////
@@ -161,7 +162,7 @@ public abstract class Surface extends PixelBuffer implements Task {
 
     /** subclasses should invoke this method when the user resizes the window */
     protected final void SizeChange(final int width, final int height) {
-        if (pendingWidth == width && pendingHeight == height) return;
+        if (unrendered || (pendingWidth == width && pendingHeight == height)) return;
         pendingWidth = width;
         pendingHeight = height;
         syncRootBoxToSurface = true;
@@ -282,6 +283,8 @@ public abstract class Surface extends PixelBuffer implements Task {
                 return;
             }
         }
+
+        unrendered = false;
     }
 
     // FEATURE: reinstate recycler