#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 03 Nov 2016 18:45:33 +0100
changeset 20754 6d076c61a915
parent 20753 eae3585244d1
child 20755 8266a42d28e3
#FEATURE by cg class: ProcessorScheduler added: #anyScheduledWindowGroupAtAll changed: #checkForEndOfDispatch
ProcessorScheduler.st
--- a/ProcessorScheduler.st	Thu Nov 03 18:36:46 2016 +0100
+++ b/ProcessorScheduler.st	Thu Nov 03 18:45:33 2016 +0100
@@ -1550,6 +1550,23 @@
     "Modified: 17.4.1997 / 12:59:33 / stefan"
 !
 
+anyScheduledWindowGroupAtAll
+    "return true, if there is any window group with active topviews.
+     This is used to determine if we should stop scheduling
+     in standAlone applications."
+
+    Screen notNil ifTrue:[
+        Screen allScreens notEmptyOrNil ifTrue:[
+            WindowGroup scheduledWindowGroups notEmptyOrNil ifTrue:[^ true]. 
+        ].
+    ].
+    ^ false
+
+    "
+     Processor anyScheduledWindowGroupAtAll
+    "
+!
+
 anyUserProcessAtAll
     "return true, if there is any user process still running,
      or waiting on a semaphore.
@@ -3335,11 +3352,13 @@
         "/ and no writeSemaphores are present
         wasBlocked := OperatingSystem blockInterrupts.
 
-        self anyUserProcessAtAll ifFalse:[
-            'Processor [info]: end of dispatch' infoPrintCR.
-            dispatching := false.
-            MiniInspector basicNew printInstVarsOf:self.
-            MiniDebugger enter:thisContext withMessage:'about to exit' mayProceed:true.
+        self anyScheduledWindowGroupAtAll ifFalse:[
+            self anyUserProcessAtAll ifFalse:[
+                'Processor [info]: end of dispatch' infoPrintCR.
+                dispatching := false.
+                MiniInspector basicNew printInstVarsOf:self.
+                MiniDebugger enter:thisContext withMessage:'about to exit' mayProceed:true.
+            ].
         ].
         
         wasBlocked ifFalse:[OperatingSystem unblockInterrupts].