798 |top nm dev devNm| |
798 |top nm dev devNm| |
799 |
799 |
800 previousGroup := nil. |
800 previousGroup := nil. |
801 |
801 |
802 myProcess isNil ifTrue:[ |
802 myProcess isNil ifTrue:[ |
803 isModal := false. |
803 isModal := false. |
804 |
804 |
805 "/ |
805 "/ |
806 "/ this is the windowGroup process; |
806 "/ this is the windowGroup process; |
807 "/ realize all views, then handle events forever |
807 "/ realize all views, then handle events forever |
808 "/ (well, not really forever ... ;-) |
808 "/ (well, not really forever ... ;-) |
809 |
809 |
810 myProcess := [ |
810 myProcess := [ |
811 WindowGroupQuerySignal handle:[:ex | |
811 WindowGroupQuerySignal handle:[:ex | |
812 ex proceedWith:self |
812 ex proceedWith:self |
813 ] do:[ |
813 ] do:[ |
814 [ |
814 [ |
815 startupAction value. |
815 startupAction value. |
816 self eventLoopWhile:[true] onLeave:[] |
816 self eventLoopWhile:[true] onLeave:[] |
817 ] valueNowOrOnUnwindDo:[ |
817 ] valueNowOrOnUnwindDo:[ |
818 self closeDownViews |
818 self closeDownViews |
819 ] |
819 ] |
820 ] |
820 ] |
821 ] forkAt:(Processor userSchedulingPriority). |
821 ] newProcess. |
822 |
822 myProcess priority:(Processor userSchedulingPriority). |
823 (topViews size > 0) ifTrue:[ |
823 |
824 "/ |
824 (topViews size > 0) ifTrue:[ |
825 "/ give the windowGroup process a user friendly name |
825 "/ |
826 "/ ask its topView for the processName, and |
826 "/ give the windowGroup process a user friendly name |
827 "/ optionally append the displayName (if its not the default) |
827 "/ ask its topView for the processName, and |
828 "/ |
828 "/ optionally append the displayName (if its not the default) |
829 top := topViews first. |
829 "/ |
830 nm := top processName. |
830 top := topViews first. |
831 |
831 nm := top processName. |
832 (dev := top graphicsDevice) notNil ifTrue:[ |
832 |
833 devNm := dev displayName. |
833 (dev := top graphicsDevice) notNil ifTrue:[ |
834 (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ |
834 devNm := dev displayName. |
835 nm := nm , ' (' , devNm , ')' |
835 (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ |
836 ] |
836 nm := nm , ' (' , devNm , ')' |
837 ] |
837 ] |
838 ] ifFalse:[ |
838 ] |
839 nm := 'window handler'. |
839 ] ifFalse:[ |
840 ]. |
840 nm := 'window handler'. |
841 myProcess name:nm. |
841 ]. |
842 myProcess beGroupLeader. |
842 myProcess name:nm. |
843 |
843 myProcess beGroupLeader. |
844 "/ |
844 |
845 "/ when the process gets suspended, |
845 "/ |
846 "/ there maybe still buffered draw requests. |
846 "/ when the process gets suspended, |
847 "/ Arrange for them to be flushed then. |
847 "/ there maybe still buffered draw requests. |
848 "/ (otherwise, you would not see the output of a process, |
848 "/ Arrange for them to be flushed then. |
849 "/ which suspends and waits - or we had to add buffer flushes |
849 "/ (otherwise, you would not see the output of a process, |
850 "/ all over the place) |
850 "/ which suspends and waits - or we had to add buffer flushes |
851 "/ |
851 "/ all over the place) |
852 myProcess addSuspendAction:[ |
852 "/ |
853 |dev| |
853 myProcess addSuspendAction:[ |
854 |
854 |dev| |
855 dev := self graphicsDevice. |
855 |
856 dev notNil ifTrue:[dev flush]. |
856 dev := self graphicsDevice. |
857 ]. |
857 dev notNil ifTrue:[dev flush]. |
|
858 ]. |
|
859 |
|
860 myProcess resume. |
858 ] |
861 ] |
859 |
862 |
860 "Modified: / 13.12.1995 / 14:04:53 / stefan" |
863 "Modified: / 13.12.1995 / 14:04:53 / stefan" |
861 "Created: / 24.7.1997 / 12:52:04 / cg" |
864 "Created: / 24.7.1997 / 12:52:04 / cg" |
862 "Modified: / 4.12.1997 / 14:13:35 / cg" |
865 "Modified: / 4.12.1997 / 14:13:35 / cg" |