#FEATURE by cg
class: ProcessorScheduler
added: #anyScheduledWindowGroupAtAll
changed: #checkForEndOfDispatch
--- 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].