# HG changeset patch # User Claus Gittinger # Date 1001660905 -7200 # Node ID 64ae1498b94caa1481dbc0d8a629483378458916 # Parent e7da73a7e77bb8480fdccecbc640d88a70868a97 *** empty log message *** diff -r e7da73a7e77b -r 64ae1498b94c 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!