checkin from browser
authorClaus Gittinger <cg@exept.de>
Wed, 17 Feb 1999 00:25:00 +0100
changeset 1101 712810d0e8a9
parent 1100 5f25636fad8c
child 1102 1ee9a1bc9241
checkin from browser
ExternalTopView.st
--- a/ExternalTopView.st	Mon Feb 15 21:15:14 1999 +0100
+++ b/ExternalTopView.st	Wed Feb 17 00:25:00 1999 +0100
@@ -65,12 +65,24 @@
 !ExternalTopView methodsFor:'private'!
 
 checkWindowStillAlive
-    "/ check for a destroyed topView (since we do not get any events from X)
+    "check for a destroyed topView 
+     (must poll, since we do not get any events from X)"
+
+    |prevHandler ok|
+
+"/    Transcript showCR:'check ...'.
+
+    ok := device isValidWindowId:drawableId.
 
-    Transcript showCR:'check ...'.
-    Processor 
-        addTimedBlock:[self sensor pushUserEvent:#checkWindowStillAlive for:self]
-        afterMilliseconds:2000
+    ok ifFalse:[
+"/        Transcript showCR:'no ...'.
+        self destroyed.
+    ] ifTrue:[
+        Processor 
+            addTimedBlock:[self checkWindowStillAlive]
+            for:nil
+            afterMilliseconds:1000
+    ]
 ! !
 
 !ExternalTopView methodsFor:'private accessing'!
@@ -119,5 +131,5 @@
 !ExternalTopView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ExternalTopView.st,v 1.7 1999-02-15 17:47:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ExternalTopView.st,v 1.8 1999-02-16 23:25:00 cg Exp $'
 ! !