--- a/SimpleView.st Wed Feb 26 17:06:57 2020 +0100
+++ b/SimpleView.st Wed Feb 26 18:08:12 2020 +0100
@@ -3152,8 +3152,8 @@
"make sure that the view is fully visible by shifting it
into the visible screen area if necessary."
- |myDevice originVisible cornerVisible newTop newLeft deviceBounds
- deviceLeft deviceRight deviceTop deviceBottom origin corner
+ |myDevice originVisible cornerVisible newTop newLeft monitorBounds
+ monitorLeft monitorRight monitorTop monitorBottom origin corner
referencePoint|
myDevice := device.
@@ -3174,7 +3174,7 @@
"origin is visible"
referencePoint := origin.
] ifFalse:[
- cornerVisible notNil ifTrue:[
+ cornerVisible ifTrue:[
"corner is visible"
referencePoint := corner.
] ifFalse:[
@@ -3182,17 +3182,17 @@
].
].
].
- deviceBounds := myDevice monitorBoundsAt:referencePoint.
-
- deviceLeft := deviceBounds left.
- deviceRight := deviceBounds right.
- deviceTop := deviceBounds top.
- deviceBottom := deviceBounds bottom.
-
- originVisible ifTrue:[ deviceBottom := deviceBottom min:(myDevice usableHeightAt:origin) ].
- cornerVisible ifTrue:[ deviceBottom := deviceBottom min:(myDevice usableHeightAt:corner) ].
-
- corner y > deviceBottom ifTrue:[
+ monitorBounds := myDevice monitorBoundsAt:referencePoint.
+
+ monitorLeft := monitorBounds left.
+ monitorRight := monitorBounds right.
+ monitorTop := monitorBounds top.
+ monitorBottom := monitorBounds bottom.
+
+ originVisible ifTrue:[ monitorBottom := monitorBottom min:(monitorTop + (myDevice usableHeightAt:origin)) ].
+ cornerVisible ifTrue:[ monitorBottom := monitorBottom min:(monitorTop + (myDevice usableHeightAt:corner)) ].
+
+ corner y > monitorBottom ifTrue:[
cornerVisible := false.
].
@@ -3203,26 +3203,26 @@
"/ deviceRight := deviceRight min:device usableWidth.
originVisible ifFalse:[
cornerVisible ifFalse:[
- newTop := deviceBottom - height.
- newLeft := deviceRight - width.
- newLeft := newLeft max:deviceLeft.
- newTop := newTop max:deviceTop.
+ newTop := monitorBottom - height.
+ newLeft := monitorRight - width.
+ newLeft := newLeft max:monitorLeft.
+ newTop := newTop max:monitorTop.
] ifTrue:[
"/ origin is not; corner is in
- newLeft := (deviceLeft max:newLeft).
- newTop := (deviceTop max:newTop).
+ newLeft := (monitorLeft max:newLeft).
+ newTop := (monitorTop max:newTop).
].
] ifTrue:[
"/ notice, the position-dependent query: if there is a higher secondary screen,
"/ this makes a difference in where a popUpMenu is allowed...
- (corner y > deviceBottom) ifTrue:[
- newTop := deviceBottom - height
+ (corner y > monitorBottom) ifTrue:[
+ newTop := monitorBottom - height
].
- (corner x > deviceRight) ifTrue:[
- newLeft := deviceRight - width
+ (corner x > monitorRight) ifTrue:[
+ newLeft := monitorRight - width
].
- newLeft := newLeft max:deviceLeft.
- newTop := newTop max:deviceTop.
+ newLeft := newLeft max:monitorLeft.
+ newTop := newTop max:monitorTop.
].
((newTop ~~ top) or:[newLeft ~~ left]) ifTrue:[