# HG changeset patch # User Claus Gittinger # Date 935141564 -7200 # Node ID c43fdd39d2e57924dee62847b4b2016fcbb35d21 # Parent cac9758df2cad2662159f23b8f3b2a8377e7ac07 startupWith:startupAction setup the process and its actions before resume diff -r cac9758df2ca -r c43fdd39d2e5 WGroup.st --- a/WGroup.st Wed Aug 18 22:52:07 1999 +0200 +++ b/WGroup.st Fri Aug 20 11:32:44 1999 +0200 @@ -800,61 +800,64 @@ previousGroup := nil. myProcess isNil ifTrue:[ - isModal := false. + isModal := false. - "/ - "/ this is the windowGroup process; - "/ realize all views, then handle events forever - "/ (well, not really forever ... ;-) + "/ + "/ this is the windowGroup process; + "/ realize all views, then handle events forever + "/ (well, not really forever ... ;-) - myProcess := [ - WindowGroupQuerySignal handle:[:ex | - ex proceedWith:self - ] do:[ - [ - startupAction value. - self eventLoopWhile:[true] onLeave:[] - ] valueNowOrOnUnwindDo:[ - self closeDownViews - ] - ] - ] forkAt:(Processor userSchedulingPriority). + myProcess := [ + WindowGroupQuerySignal handle:[:ex | + ex proceedWith:self + ] do:[ + [ + startupAction value. + self eventLoopWhile:[true] onLeave:[] + ] valueNowOrOnUnwindDo:[ + self closeDownViews + ] + ] + ] newProcess. + myProcess priority:(Processor userSchedulingPriority). - (topViews size > 0) ifTrue:[ - "/ - "/ give the windowGroup process a user friendly name - "/ ask its topView for the processName, and - "/ optionally append the displayName (if its not the default) - "/ - top := topViews first. - nm := top processName. + (topViews size > 0) ifTrue:[ + "/ + "/ give the windowGroup process a user friendly name + "/ ask its topView for the processName, and + "/ optionally append the displayName (if its not the default) + "/ + top := topViews first. + nm := top processName. - (dev := top graphicsDevice) notNil ifTrue:[ - devNm := dev displayName. - (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ - nm := nm , ' (' , devNm , ')' - ] - ] - ] ifFalse:[ - nm := 'window handler'. - ]. - myProcess name:nm. - myProcess beGroupLeader. + (dev := top graphicsDevice) notNil ifTrue:[ + devNm := dev displayName. + (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ + nm := nm , ' (' , devNm , ')' + ] + ] + ] ifFalse:[ + nm := 'window handler'. + ]. + myProcess name:nm. + myProcess beGroupLeader. - "/ - "/ when the process gets suspended, - "/ there maybe still buffered draw requests. - "/ Arrange for them to be flushed then. - "/ (otherwise, you would not see the output of a process, - "/ which suspends and waits - or we had to add buffer flushes - "/ all over the place) - "/ - myProcess addSuspendAction:[ - |dev| + "/ + "/ when the process gets suspended, + "/ there maybe still buffered draw requests. + "/ Arrange for them to be flushed then. + "/ (otherwise, you would not see the output of a process, + "/ which suspends and waits - or we had to add buffer flushes + "/ all over the place) + "/ + myProcess addSuspendAction:[ + |dev| - dev := self graphicsDevice. - dev notNil ifTrue:[dev flush]. - ]. + dev := self graphicsDevice. + dev notNil ifTrue:[dev flush]. + ]. + + myProcess resume. ] "Modified: / 13.12.1995 / 14:04:53 / stefan" @@ -2084,6 +2087,6 @@ !WindowGroup class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.178 1999-08-02 08:57:59 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.179 1999-08-20 09:32:44 cg Exp $' ! ! WindowGroup initialize! diff -r cac9758df2ca -r c43fdd39d2e5 WindowGroup.st --- a/WindowGroup.st Wed Aug 18 22:52:07 1999 +0200 +++ b/WindowGroup.st Fri Aug 20 11:32:44 1999 +0200 @@ -800,61 +800,64 @@ previousGroup := nil. myProcess isNil ifTrue:[ - isModal := false. + isModal := false. - "/ - "/ this is the windowGroup process; - "/ realize all views, then handle events forever - "/ (well, not really forever ... ;-) + "/ + "/ this is the windowGroup process; + "/ realize all views, then handle events forever + "/ (well, not really forever ... ;-) - myProcess := [ - WindowGroupQuerySignal handle:[:ex | - ex proceedWith:self - ] do:[ - [ - startupAction value. - self eventLoopWhile:[true] onLeave:[] - ] valueNowOrOnUnwindDo:[ - self closeDownViews - ] - ] - ] forkAt:(Processor userSchedulingPriority). + myProcess := [ + WindowGroupQuerySignal handle:[:ex | + ex proceedWith:self + ] do:[ + [ + startupAction value. + self eventLoopWhile:[true] onLeave:[] + ] valueNowOrOnUnwindDo:[ + self closeDownViews + ] + ] + ] newProcess. + myProcess priority:(Processor userSchedulingPriority). - (topViews size > 0) ifTrue:[ - "/ - "/ give the windowGroup process a user friendly name - "/ ask its topView for the processName, and - "/ optionally append the displayName (if its not the default) - "/ - top := topViews first. - nm := top processName. + (topViews size > 0) ifTrue:[ + "/ + "/ give the windowGroup process a user friendly name + "/ ask its topView for the processName, and + "/ optionally append the displayName (if its not the default) + "/ + top := topViews first. + nm := top processName. - (dev := top graphicsDevice) notNil ifTrue:[ - devNm := dev displayName. - (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ - nm := nm , ' (' , devNm , ')' - ] - ] - ] ifFalse:[ - nm := 'window handler'. - ]. - myProcess name:nm. - myProcess beGroupLeader. + (dev := top graphicsDevice) notNil ifTrue:[ + devNm := dev displayName. + (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ + nm := nm , ' (' , devNm , ')' + ] + ] + ] ifFalse:[ + nm := 'window handler'. + ]. + myProcess name:nm. + myProcess beGroupLeader. - "/ - "/ when the process gets suspended, - "/ there maybe still buffered draw requests. - "/ Arrange for them to be flushed then. - "/ (otherwise, you would not see the output of a process, - "/ which suspends and waits - or we had to add buffer flushes - "/ all over the place) - "/ - myProcess addSuspendAction:[ - |dev| + "/ + "/ when the process gets suspended, + "/ there maybe still buffered draw requests. + "/ Arrange for them to be flushed then. + "/ (otherwise, you would not see the output of a process, + "/ which suspends and waits - or we had to add buffer flushes + "/ all over the place) + "/ + myProcess addSuspendAction:[ + |dev| - dev := self graphicsDevice. - dev notNil ifTrue:[dev flush]. - ]. + dev := self graphicsDevice. + dev notNil ifTrue:[dev flush]. + ]. + + myProcess resume. ] "Modified: / 13.12.1995 / 14:04:53 / stefan" @@ -2084,6 +2087,6 @@ !WindowGroup class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.178 1999-08-02 08:57:59 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.179 1999-08-20 09:32:44 cg Exp $' ! ! WindowGroup initialize!