changed: #makeFullyVisible
authorStefan Vogel <sv@exept.de>
Mon, 25 Oct 2010 11:36:18 +0200
changeset 5639 1fd25938a833
parent 5638 910b8566b7c0
child 5640 2116555f5672
changed: #makeFullyVisible multi-screen support broke linux
SimpleView.st
--- a/SimpleView.st	Mon Oct 25 11:34:16 2010 +0200
+++ b/SimpleView.st	Mon Oct 25 11:36:18 2010 +0200
@@ -2852,7 +2852,7 @@
      into the visible screen area if nescessary.
      This method will be moved to StandardSystemView ..."
 
-    |originMonitor cornerMonitor originVisible cornerVisible newTop newLeft deviceBounds 
+    |originVisible cornerVisible newTop newLeft deviceBounds 
      deviceLeft deviceRight deviceTop deviceBottom origin corner|
 
     newTop := top.
@@ -2861,18 +2861,18 @@
     origin := left@top.
     corner := (left + width)@(top + height).
 
-    originMonitor := device monitorHandleForPoint:origin.
-    cornerMonitor := device monitorHandleForPoint:corner.
-    originVisible := originMonitor notNil.
-    cornerVisible := cornerMonitor notNil.
-
-    originMonitor = cornerMonitor ifTrue:[
+    originVisible := device pointIsVisible:origin.
+    cornerVisible := device pointIsVisible:corner.
+
+    (device pointsAreOnSameMonitor:origin and:corner) ifTrue:[
         deviceBounds := device monitorBoundsAt:origin.
     ] ifFalse:[
         originVisible ifTrue:[
+            "origin is visible"
             deviceBounds := device monitorBoundsAt:origin.
         ] ifFalse:[
-            cornerVisible ifTrue:[
+            cornerVisible notNil ifTrue:[
+                "corner is visible"
                 deviceBounds := device monitorBoundsAt:corner.
             ] ifFalse:[
                 deviceBounds := device monitorBoundsAt:1@1.
@@ -10697,11 +10697,11 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.673 2010-10-24 13:45:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.674 2010-10-25 09:36:18 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.673 2010-10-24 13:45:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.674 2010-10-25 09:36:18 stefan Exp $'
 ! !
 
 SimpleView initialize!