2002/07/01 21:03:52
[org.ibex.core.git] / src / org / xwt / Platform.java
index 959c775..4fee620 100644 (file)
@@ -310,8 +310,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, ret.width);
-        b.set(Box.size, 1, ret.height);
+        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));
 
         Object titlebar = b.get("titlebar", null, true);
         if (titlebar != null) ret.setTitleBarText(titlebar.toString());