2002/04/21 16:19:23
[org.ibex.core.git] / src / org / xwt / Surface.java
index 4cc5f59..58339c8 100644 (file)
@@ -258,7 +258,9 @@ public abstract class Surface {
         this.width = width;
         this.height = height;
         abort = true;
-        lastResizeTime = System.currentTimeMillis();
+        long lastResizeTime = System.currentTimeMillis();
+        lastResizeTimeTop = (int)(lastResizeTime >> 32);
+        lastResizeTimeBottom = (int)(lastResizeTime & 0xffffffff);
         Refresh();
     }
 
@@ -274,11 +276,15 @@ public abstract class Surface {
     protected final void Focused(boolean b) { new SimpleMessage("Focused", b ? Boolean.TRUE : Boolean.FALSE, null); }
     public static void Refresh() { MessageQueue.refresh(); }
 
+    // the following value is split into two int's to work around GCJ bug java/6393
+
     /** used in conjunction with Platform.supressDirtyOnResize() */
-    private long lastResizeTime = 0;
+    private int lastResizeTimeTop = 0;
+    private int lastResizeTimeBottom = 0;
 
     /** This is how subclasses signal a 'shallow dirty', indicating that although the backbuffer is valid, the screen is not */
     public final void Dirty(int x, int y, int w, int h) {
+        long lastResizeTime = (((long)lastResizeTimeTop) << 32) | (long)lastResizeTimeBottom;
         if (Platform.supressDirtyOnResize() && System.currentTimeMillis() - lastResizeTime < 100 && (w >= width - 1 || h >= height - 1)) return;
         screenDirtyRegions.dirty(x, y, w, h);
         blitDirtyScreenRegions();