# HG changeset patch # User Stefan Vogel # Date 1453218562 -3600 # Node ID b84bfa64800f14c0c8b0a356cf9e6bdafe497ed2 # Parent 945d260fb1b3963acc615cf3446d02d6db0fff11 #DOCUMENTATION class: DeviceWorkstation comment/format in: #checkForEndOfDispatch diff -r 945d260fb1b3 -r b84bfa64800f DeviceWorkstation.st --- a/DeviceWorkstation.st Sat Jan 16 04:57:22 2016 +0000 +++ b/DeviceWorkstation.st Tue Jan 19 16:49:22 2016 +0100 @@ -4721,37 +4721,36 @@ ! checkForEndOfDispatch - "return true, if there are still any views of interest - - if not, stop dispatch. + "if there are no longer any views of interest - stop dispatch. This ends the dispatcher process when the last view is closed on that device. We only do this for displays other that the default Display." dispatching ifFalse:[^ self]. self == Display ifTrue:[ - ExitOnLastClose == true ifFalse:[^ self]. + ExitOnLastClose == true ifFalse:[^ self]. ]. exitOnLastClose == true ifFalse:[^ self]. knownViews notNil ifTrue:[ - "/ if there is no non-popup topview, stop dispatching - (knownViews contains:[:slot | - slot notNil - and:[slot class ~~ SmallInteger - and:[(self viewIsRelevantInCheckForEndOfDispatch:slot) - and:[true "slot isModal not" - "and:[slot realized]"]]]]) - ifFalse:[ - "/ my last view was closed - dispatching := false. - 'DeviceWorkstation [info]: finished dispatch (last view closed): ' infoPrint. - self infoPrintCR. - LastActiveScreen == self ifTrue:[ - LastActiveScreen := nil. - LastActiveProcess := nil. - ]. - eventSema notNil ifTrue:[eventSema signal]. "/ get dispatchLoop out of its wait... - ] + "/ if there is no non-popup topview, stop dispatching + (knownViews contains:[:slot | + slot notNil + and:[slot class ~~ SmallInteger + and:[(self viewIsRelevantInCheckForEndOfDispatch:slot) + and:[true "slot isModal not" + "and:[slot realized]"]]]]) + ifFalse:[ + "/ my last view was closed + dispatching := false. + 'DeviceWorkstation [info]: finished dispatch (last view closed): ' infoPrint. + self infoPrintCR. + LastActiveScreen == self ifTrue:[ + LastActiveScreen := nil. + LastActiveProcess := nil. + ]. + eventSema notNil ifTrue:[eventSema signal]. "/ get dispatchLoop out of its wait... + ] ]. "Modified: 19.9.1995 / 11:31:54 / claus"