WindowGroup.st
changeset 8309 bc91f4defe96
parent 8292 082e3614bf28
child 8310 468aa7b09b9b
--- a/WindowGroup.st	Fri Mar 16 12:13:48 2018 +0100
+++ b/WindowGroup.st	Fri Mar 16 12:32:23 2018 +0100
@@ -251,6 +251,8 @@
         WindowGroupQuerySignal := WindowGroupQuery.
         LastEventQuerySignal := LastEventQuery.
 
+        BusyHookTime := 150.     "ms"
+
 "/        WindowGroupQuerySignal := QuerySignal new.
 "/        WindowGroupQuerySignal nameClass:self message:#windowGroupQuerySignal.
 "/        WindowGroupQuerySignal notifierString:'query for windowgroup'.
@@ -263,6 +265,7 @@
     "WindowGroup initialize"
 
     "Modified: / 27-01-2011 / 18:14:34 / cg"
+    "Modified: / 16-03-2018 / 12:28:11 / stefan"
 ! !
 
 !WindowGroup class methodsFor:'instance creation'!
@@ -1641,15 +1644,17 @@
 
     <resource: #keyboard (#Escape )>
 
-    |event ignore focus firstTop evView
-     modalTops modalTop modalDelegate keyboardProcessor
-     busyHookBlock busyHookCalled top evReceiver|
+    |event busyHookBlock busyHookCalled|
 
     self processExposeEvents.
 
-    [
+    [ "... on:ensure:"
         [mySensor notNil
          and:[(event := mySensor nextEvent) notNil]] whileTrue:[
+            |ignore focus firstTop evView
+             modalTop modalDelegate keyboardProcessor
+             top evReceiver|
+
             ignore := false.
             focus := focusView.
             modalDelegate := false.
@@ -1659,10 +1664,7 @@
                 "/ an incoming event for a masterView, 
                 "/ while being blocked by some other modalView.
 
-                modalTops := modalGroup topViews.
-                modalTops notEmptyOrNil ifTrue:[
-                    modalTop := modalTops first.
-                ].
+                modalTop := modalGroup topViews firstOrNil.
 
                 event isKeyEvent ifTrue:[
                     "/ forward keyboard events to my modal
@@ -1822,7 +1824,7 @@
                                 Processor 
                                     addTimedBlock:busyHookBlock 
                                     for:Processor timeoutHandlerProcess
-                                    afterMilliseconds:(busyHookTimeout ? BusyHookTime ? 150).
+                                    afterMilliseconds:(busyHookTimeout ? BusyHookTime).
                             ].
                         ].
                         event isMessageSendEvent ifTrue:[
@@ -1878,7 +1880,7 @@
 
     "Created: / 05-03-1997 / 11:33:11 / cg"
     "Modified: / 04-08-1998 / 18:18:55 / cg"
-    "Modified: / 31-01-2017 / 16:48:45 / stefan"
+    "Modified: / 16-03-2018 / 12:29:04 / stefan"
 !
 
 processExposeEvents