From: megacz Date: Fri, 30 Jan 2004 06:49:11 +0000 (+0000) Subject: 2002/07/19 04:46:04 X-Git-Tag: RC3~1619 X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=0adc0a8f84391f191e793f1903bf354408bdd416 2002/07/19 04:46:04 darcs-hash:20040130064911-2ba56-ff539d55f54b58bc14fd193d5f629c1a97ebf73f.gz --- diff --git a/CHANGES b/CHANGES index 9cf38aa..977e686 100644 --- a/CHANGES +++ b/CHANGES @@ -279,3 +279,6 @@ 18-Jul megacz XMLRPC.java, MessageQueue.java: attempted to improve responsiveness of UI by yielding on network ops if non-thread events are in the queue. + +18-Jul megacz Platform.java: never create or permit windows smaller + than the scar. diff --git a/src/org/xwt/Platform.java b/src/org/xwt/Platform.java index a7f0627..dc706f5 100644 --- a/src/org/xwt/Platform.java +++ b/src/org/xwt/Platform.java @@ -225,7 +225,7 @@ public class Platform { String s; while ((s = br.readLine()) != null) if (s.startsWith(key + "=")) - return s.substring(0, key.length() + 1); + return s.substring(key.length() + 1); } catch (Exception e) { if (Log.on) Log.log(this, "Exception while reading from environment:"); if (Log.on) Log.log(this, e); @@ -351,8 +351,8 @@ public class Platform { public static Surface createSurface(Box b, boolean framed, boolean refreshable) { Surface ret = platform._createSurface(b, framed); ret.setInvisible(b.invisible); - b.set(Box.size, 0, b.size(0) == 0 ? 10 : b.size(0)); - b.set(Box.size, 1, b.size(1) == 0 ? 10 : b.size(1)); + b.set(Box.size, 0, b.size(0) < Surface.scarPicture.getWidth() ? Surface.scarPicture.getWidth() : b.size(0)); + b.set(Box.size, 1, b.size(1) < Surface.scarPicture.getHeight() ? Surface.scarPicture.getHeight() : b.size(1)); Object titlebar = b.get("titlebar", null, true); if (titlebar != null) ret.setTitleBarText(titlebar.toString());