*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 28 Sep 2001 09:08:25 +0200
changeset 3513 64ae1498b94c
parent 3512 e7da73a7e77b
child 3514 a20d990a7b3b
*** empty log message ***
DeviceWorkstation.st
--- a/DeviceWorkstation.st	Wed Sep 26 18:53:52 2001 +0200
+++ b/DeviceWorkstation.st	Fri Sep 28 09:08:25 2001 +0200
@@ -1391,7 +1391,7 @@
      point is (this may be a subview). Return nil, if its not an ST/X view
      or if the point is on the background"
 
-    |searchId foundId|
+    |searchId foundId n|
 
     searchId := self realRootWindowId.
 
@@ -1399,12 +1399,18 @@
     "/ along with an illegal id (which happens, if a view from another
     "/ screen-device is picked ...)
     self class deviceErrorSignal handle:[:ex |
-	^ nil
+        ^ nil
     ] do:[
-	[searchId notNil] whileTrue:[
-	    foundId := searchId.
-	    searchId := self viewIdFromPoint:aPoint in:searchId.
-	]
+        n := 0.
+        [searchId notNil] whileTrue:[
+            n := n + 1.
+            n > 1000 ifTrue:[
+                self halt:'oops - endless view hierarchy'.
+                ^ nil
+            ].
+            foundId := searchId.
+            searchId := self viewIdFromPoint:aPoint in:searchId.
+        ]
     ].
     ^ foundId
 !
@@ -7336,6 +7342,6 @@
 !DeviceWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.401 2001-09-05 17:27:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.402 2001-09-28 07:08:25 cg Exp $'
 ! !
 DeviceWorkstation initialize!