2003/08/10 07:40:09
[org.ibex.core.git] / src / org / xwt / Surface.java
index 28e4819..dba087e 100644 (file)
@@ -327,7 +327,7 @@ public abstract class Surface {
     Vec keywatchers = new Vec();
 
     /** When set to true, render() should abort as soon as possible and restart the rendering process */
-    volatile boolean abort = false;
+    static volatile boolean abort = false;
 
     /** a solid red 10x10 double buffer */
     private DoubleBuffer showRenderBuf = null;
@@ -405,9 +405,9 @@ public abstract class Surface {
 
         // make sure the root is properly sized
         do {
-            Box.abort = false;
+            abort = false;
             root.reflow();
-        } while(Box.abort);
+        } while(abort);
 
         // this is a bit dangerous since we're passing ourselves to another method before subclasses' ctors have run...        
         backbuffer = Platform.createDoubleBuffer(Platform.getScreenWidth(), Platform.getScreenHeight(), this);
@@ -420,7 +420,7 @@ public abstract class Surface {
     public synchronized void render() {
 
         // if the window size changed as a result of a user action, we have to update the root box's size
-        if (root.width != width || root.width != height) {
+        if (root.width != width || root.height != height) {
 
             // since the scar will be moving, dirty the place it used to be
             if (scarred) dirty(hscar,
@@ -437,14 +437,14 @@ public abstract class Surface {
 
         // make sure the root is properly sized
         do {
-            Box.abort = false;
+            abort = false;
             root.reflow();
             // update mouseinside and trigger Enter/Leave as a result of box size/position changes
             String oldcursor = cursor;
             cursor = "default";
             root.Move(mousex, mousey, mousex, mousey);
             if (!cursor.equals(oldcursor)) syncCursor();
-        } while(Box.abort);
+        } while(abort);
 
         if (centerSurfaceOnRender) {
             centerSurfaceOnRender = false;