From c9f6b3dd256396e17df86a371a27baa794c534ce Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 06:45:19 +0000 Subject: [PATCH] 2002/04/21 16:19:23 darcs-hash:20040130064519-2ba56-0b6f1fb57fb3d23dc4ba0b40ed59f6bc2367632d.gz --- CHANGES | 2 ++ src/org/xwt/Surface.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 01ca731..7c00770 100644 --- a/CHANGES +++ b/CHANGES @@ -25,3 +25,5 @@ 21-Apr megacz src/org/xwt/plat/GCJ.xml: removed -fno-rtti +21-Apr megacz src/org/xwt/Surface.java: workaround for GCJ PR java/6393 + diff --git a/src/org/xwt/Surface.java b/src/org/xwt/Surface.java index 4cc5f59..58339c8 100644 --- a/src/org/xwt/Surface.java +++ b/src/org/xwt/Surface.java @@ -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(); -- 1.7.10.4