X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FPlatform.java;h=dc706f552745d7e3601986db4b4ca3c1fbbfac14;hb=0adc0a8f84391f191e793f1903bf354408bdd416;hp=a7f0627a5409ce2437d2bcf6e29f5c6d3e5b4596;hpb=38c7cb80528704b6771220448f36da4199f66453;p=org.ibex.core.git 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());