--- 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.