only move canvas & gallery, if windowManager placed windows
authorClaus Gittinger <cg@exept.de>
Thu, 15 Jul 1999 14:31:34 +0200
changeset 1197 ef91ed58b7d4
parent 1196 e2ced3798ed5
child 1198 6b7cfe55105b
only move canvas & gallery, if windowManager placed windows on top of each other
UIPainter.st
--- a/UIPainter.st	Tue Jul 13 23:22:48 1999 +0200
+++ b/UIPainter.st	Thu Jul 15 14:31:34 1999 +0200
@@ -2942,8 +2942,6 @@
     super postOpenWith: aBuilder.
     treeView selection: #(1).
 
-    "/ try to lay out things non-overlapping
-
     myWindow := self window.
     canvasWindow := self painter topView.
     galleryWindow := selectionPanel window.
@@ -2951,18 +2949,24 @@
     myOrg := myWindow origin.
     myCorner := myWindow corner.
 
-    canvasOrg := 10@20.
-    myOrg := (device width - myWindow width - 20) @ 20.
-    galleryOrg := (device width - galleryWindow width - 20) 
-                  @ 
-                  ((myWindow height + 20) min:(device height - galleryWindow height - 20)).
-    myWindow origin:myOrg.
-
-    canvasWindow origin:canvasOrg.
-    galleryWindow origin:galleryOrg.
-
-    galleryWindow raise.
-    canvasWindow raise.
+    "/ try to lay out things non-overlapping
+    "/ but only, if the window manager placed all windows
+    "/ on top of each other
+    myOrg = canvasWindow origin ifTrue:[
+
+        canvasOrg := 10@20.
+"/        myOrg := (device width - myWindow width - 20) @ 20.
+        galleryOrg := (device width - galleryWindow width - 20) 
+                      @ 
+                      ((myWindow height + 20) min:(device height - galleryWindow height - 20)).
+        myWindow origin:myOrg.
+
+        canvasWindow origin:canvasOrg.
+        galleryWindow origin:galleryOrg.
+
+        galleryWindow raise.
+        canvasWindow raise.
+    ].
 
     "Modified: / 13.7.1999 / 21:26:52 / cg"
 ! !