From: megacz Date: Fri, 30 Jan 2004 06:47:17 +0000 (+0000) Subject: 2002/05/16 04:20:18 X-Git-Tag: RC3~1742 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=7e44b314529106dfc24f09c6c3ac6b9adba92cb2 2002/05/16 04:20:18 darcs-hash:20040130064717-2ba56-2b5154f906bfeaf168b47998e340ba6e46d40311.gz --- diff --git a/CHANGES b/CHANGES index 147693a..2cea836 100644 --- a/CHANGES +++ b/CHANGES @@ -146,3 +146,6 @@ 15-May megacz HTTP.java: fixed Host: bug +15-May megacz Platform.java: added GCJ-Linux platform detection logic, + setLimits() logic. + diff --git a/src/org/xwt/Platform.java b/src/org/xwt/Platform.java index e3ee510..af9a169 100644 --- a/src/org/xwt/Platform.java +++ b/src/org/xwt/Platform.java @@ -54,8 +54,10 @@ public class Platform { String platform_class = null; //if (os_name.startsWith("Mac OS X")) platform_class = "MacOSX"; - if (vendor.startsWith("Free Software Foundation")) platform_class = "Win32"; - else if (version.startsWith("1.1") && vendor.startsWith("Netscape")) platform_class = "Netscape"; + if (vendor.startsWith("Free Software Foundation")) { + if (os_name.startsWith("Window")) platform_class = "Win32"; + else platform_class = "POSIX"; + } else if (version.startsWith("1.1") && vendor.startsWith("Netscape")) platform_class = "Netscape"; else if (version.startsWith("1.1") && vendor.startsWith("Microsoft")) platform_class = "Microsoft"; else if (version.startsWith("1.4")) platform_class = "Java14"; else if (!version.startsWith("1.0") && !version.startsWith("1.1")) platform_class = "Java12"; @@ -162,6 +164,7 @@ public class Platform { /** used to notify the user of very serious failures; usually used when logging is not working or unavailable */ protected String _getDefaultFont() { return "sansserif10"; } + /** if true, org.xwt.Surface will generate a Click automatically after a press and a release */ protected boolean _needsAutoClick() { return false; } protected void _newBrowserWindow(String url) { @@ -273,6 +276,8 @@ public class Platform { else if (Log.on) Log.log(Platform.class, "unable to load icon " + icon); } + ret.setLimits(b.dmin(0), b.dmin(1), b.dmax(0), b.dmax(1)); + if (refreshable) { Surface.refreshableSurfaceWasCreated = true; Surface.allSurfaces.addElement(ret);