Merge jv
authorMerge Script
Thu, 23 Jun 2016 06:53:17 +0200
branchjv
changeset 3702 302fdbf441aa
parent 3700 673d3009a02d (current diff)
parent 3701 85982bace9f7 (diff)
child 3705 41fb7ac398f5
Merge
--- a/WindowBuilder.st	Fri Jun 10 07:10:50 2016 +0200
+++ b/WindowBuilder.st	Thu Jun 23 06:53:17 2016 +0200
@@ -1469,13 +1469,20 @@
         ].
 
         UserPreferences current forceWindowsIntoMonitorBounds ifTrue:[
-            (newOrigin x + window height) > monitorBounds bottom ifTrue:[
-                y := monitorBounds bottom - window height - 20.
-                newOrigin := (newOrigin x @ y).
+            |usableHeight|
+
+            (newOrigin x + window width) > monitorBounds right ifTrue:[
+                x := monitorBounds right - window width - 20.
+                newOrigin := x @ newOrigin y.
             ].
-            (newOrigin x + window height) > (windowsDevice usableHeightAt:newOrigin+window extent) ifTrue:[
-                y := (windowsDevice usableHeightAt:newOrigin+window extent) - window height - 20.
-                newOrigin := (newOrigin x @ y).
+            (newOrigin y + window height) > monitorBounds bottom ifTrue:[
+                y := monitorBounds bottom - window height - 20.
+                newOrigin := newOrigin x @ y.
+            ].
+            usableHeight := windowsDevice usableHeightAt:newOrigin+window extent.
+            (newOrigin y + window height) > usableHeight ifTrue:[
+                y := usableHeight - window height - 20.
+                newOrigin := newOrigin x @ y.
             ].
         ].
         window origin:newOrigin.