X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FSurface.java;h=082bb8b3c3f7f4b782ad83b6ec828407b4297ce2;hb=94ec4ca482d8f8b2f20796b9bd01613250be89ef;hp=28e4819fab7ff5dd24915e567bd0f09885abe7e4;hpb=ac49a62b989af76577f5b62e5afd58e7972623b4;p=org.ibex.core.git diff --git a/src/org/xwt/Surface.java b/src/org/xwt/Surface.java index 28e4819..082bb8b 100644 --- a/src/org/xwt/Surface.java +++ b/src/org/xwt/Surface.java @@ -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; @@ -388,6 +388,7 @@ public abstract class Surface { /** Indicates that the backbuffer region x,y,w,h is no longer correct and must be regenerated */ public void dirty(int x, int y, int w, int h) { + x = 0; y = 0; w = 1000; h = 1000; backbufferDirtyRegions.dirty(x, y, w, h); Refresh(); } @@ -405,9 +406,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 +421,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 +438,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;