# HG changeset patch # User Claus Gittinger # Date 1297256633 -3600 # Node ID 92d2120e3a670873597c9d23626b845a44c71b25 # Parent 0d3832fcb39ecfe3a1b34d793c9d046a463e90fd comment/format in: #dispatchLoop #reinitializeFor: diff -r 0d3832fcb39e -r 92d2120e3a67 DeviceWorkstation.st --- a/DeviceWorkstation.st Tue Feb 08 21:50:17 2011 +0100 +++ b/DeviceWorkstation.st Wed Feb 09 14:03:53 2011 +0100 @@ -4614,18 +4614,21 @@ "the actual event dispatching loop." [dispatching] whileTrue:[ - AbortAllOperationRequest handle:[:ex | - ex return - ] do:[ - self eventPending ifFalse:[ - Processor activeProcess setStateTo:#ioWait if:#active. - eventSema wait. - ]. - dispatching ifTrue:[ - self dispatchPendingEvents. - ]. - ] + "abortAll is handled, but not asked for here!!" + AbortAllOperationRequest handle:[:ex | + ex return + ] do:[ + self eventPending ifFalse:[ + Processor activeProcess setStateTo:#ioWait if:#active. + eventSema wait. + ]. + dispatching ifTrue:[ + self dispatchPendingEvents. + ]. + ] ] + + "Modified: / 09-02-2011 / 13:59:43 / cg" ! dispatchModalWhile:aBlock @@ -5945,10 +5948,10 @@ self reinitialize. blackColor notNil ifTrue:[ - blackColor releaseFromDevice. + blackColor releaseFromDevice. ]. whiteColor notNil ifTrue:[ - whiteColor releaseFromDevice. + whiteColor releaseFromDevice. ]. self releaseDeviceFonts. self releaseDeviceCursors. @@ -5973,7 +5976,7 @@ self initializeFor:aDisplayName. displayId isNil ifTrue:[ - ^ nil + ^ nil ]. " @@ -5985,53 +5988,54 @@ "/ prevMapping notNil ifTrue:[ prevKnownViews notNil ifTrue:[ - " - first round: flush all device specific stuff - " + " + first round: flush all device specific stuff + " "/ prevMapping keysAndValuesDo:[:anId :aView | - prevKnownViews do:[:aView | - (aView notNil and:[aView ~~ 0]) ifTrue:[ - aView prepareForReinit - ] - ]. - - " - 2nd round: all views should reinstall themself - on the new display - " + prevKnownViews do:[:aView | + (aView notNil and:[aView ~~ 0]) ifTrue:[ + aView prepareForReinit + ] + ]. + + " + 2nd round: all views should reinstall themself + on the new display + " "/ prevMapping keysAndValuesDo:[:anId :aView | - prevKnownViews do:[:aView | - (aView notNil and:[aView ~~ 0]) ifTrue:[ - "have to re-create the view" - (UserInterrupt, AbortAllOperationRequest) catch:[ - GraphicsContext drawingOnClosedDrawableSignal handle:[:ex | - 'DeviceWorkstation [warning]: drawing attempt on closed drawable during reinit' errorPrintCR. - ex return - ] do:[ - aView reinitialize - ] - ] - ] - ]. - - (prevWidth ~~ width - or:[prevHeight ~~ height]) ifTrue:[ - " - 3rd round: all views get a chance to handle - changed environment (colors, font sizes etc) - " + prevKnownViews do:[:aView | + (aView notNil and:[aView ~~ 0]) ifTrue:[ + "have to re-create the view" + "abortAll is handled, but not asked for here!!" + (UserInterrupt, AbortAllOperationRequest) catch:[ + GraphicsContext drawingOnClosedDrawableSignal handle:[:ex | + 'DeviceWorkstation [warning]: drawing attempt on closed drawable during reinit' errorPrintCR. + ex return + ] do:[ + aView reinitialize + ] + ] + ] + ]. + + (prevWidth ~~ width + or:[prevHeight ~~ height]) ifTrue:[ + " + 3rd round: all views get a chance to handle + changed environment (colors, font sizes etc) + " "/ prevMapping keysAndValuesDo:[:anId :aView | - prevKnownViews do:[:aView | - (aView notNil and:[aView ~~ 0]) ifTrue:[ - aView reAdjustGeometry - ] - ]. - ] + prevKnownViews do:[:aView | + (aView notNil and:[aView ~~ 0]) ifTrue:[ + aView reAdjustGeometry + ] + ]. + ] ]. dispatching := false. - "Modified: / 7.6.1998 / 02:45:13 / cg" + "Modified: / 09-02-2011 / 13:59:53 / cg" ! releaseDeviceResources @@ -8091,11 +8095,11 @@ !DeviceWorkstation class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.557 2011-02-08 20:50:17 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.558 2011-02-09 13:03:53 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.557 2011-02-08 20:50:17 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.558 2011-02-09 13:03:53 cg Exp $' ! ! DeviceWorkstation initialize!