--- a/WindowGroup.st Tue Feb 20 19:58:39 1996 +0100
+++ b/WindowGroup.st Tue Feb 20 19:59:44 1996 +0100
@@ -652,88 +652,96 @@
thisProcess := Processor activeProcess.
[
- "/
- "/ on leave, exit the event loop
- "/
- LeaveSignal handle:[:ex |
- ex return
- ] do:[
- |p g mainGroup mySema waitSema|
+ "/
+ "/ on leave, exit the event loop
+ "/
+ LeaveSignal handle:[:ex |
+ ex return
+ ] do:[
+ |p g mainGroup mySema waitSema|
- waitSema := mySema := mySensor eventSemaphore.
+ waitSema := mySema := mySensor eventSemaphore.
- isModal ifTrue:[
- mainGroup := self mainGroup.
- mainGroup == self ifTrue:[
- mainGroup := nil
- ].
- mainGroup notNil ifTrue:[
- waitSema := SemaphoreSet with:mySema
- with:(mainGroup sensor eventSemaphore).
- ].
- ].
+ isModal ifTrue:[
+ mainGroup := self mainGroup.
+ mainGroup == self ifTrue:[
+ mainGroup := nil
+ ].
+ mainGroup notNil ifTrue:[
+ waitSema := SemaphoreSet with:mySema
+ with:(mainGroup sensor eventSemaphore).
+ ].
+ ].
- aBlock whileTrue:[
- LastActiveGroup := self.
- LastActiveProcess := thisProcess.
+ aBlock whileTrue:[
+ LastActiveGroup := self.
+ LastActiveProcess := thisProcess.
- (views isNil and:[topViews isNil]) ifTrue:[
- myProcess notNil ifTrue:[
- p := myProcess.
- myProcess := nil.
- p terminate.
- "not reached - there is no life after death"
- ].
- "
- this is the end of a modal loop
- (not having a private process ...)
- "
- ^ self
- ].
+ (views isNil and:[topViews isNil]) ifTrue:[
+ myProcess notNil ifTrue:[
+ p := myProcess.
+ myProcess := nil.
+ p terminate.
+ "not reached - there is no life after death"
+ ].
+ "
+ this is the end of a modal loop
+ (not having a private process ...)
+ "
+ ^ self
+ ].
- "/
- "/ on abort, stay in the event loop
- "/
- AbortSignal handle:[:ex |
- ex return
- ] do:[
- ActivityNotificationSignal handle:[:ex |
- "/
- "/ if I am a modal-group, let it be handled
- "/ by the outer main-groups handler
- "/
- isModal ifTrue:[
- ex reject
- "never reached"
- ].
- self showActivity:(ex errorString).
- ex proceed.
- ] do:[
- |dev gotSema|
+ "/
+ "/ on abort, stay in the event loop
+ "/
+ AbortSignal handle:[:ex |
+ ex return
+ ] do:[
+ ActivityNotificationSignal handle:[:ex |
+ "/
+ "/ if I am a modal-group, let it be handled
+ "/ by the outer main-groups handler
+ "/
+ isModal ifTrue:[
+ ex reject
+ "never reached"
+ ].
+ self showActivity:(ex errorString).
+ ex proceed.
+ ] do:[
+ |dev gotSema mainView|
+
+ "/ no more events. Flush device output. This may produce more events.
+ dev := self device.
+ dev notNil ifTrue:[dev flush].
- "/ no more events. Flush device output. This may produce more events.
- dev := self device.
- dev notNil ifTrue:[dev flush].
-
- thisProcess setStateTo:#eventWait if:#active.
- gotSema := waitSema wait.
- LastActiveGroup := self.
- LastActiveProcess := thisProcess.
- gotSema == mySema ifTrue:[
- self processEvents
- ] ifFalse:[
- "
- if modal, also check for redraw events in my maingroup
- (we arrive here after we woke up on maingroup sensor eventSemaphore)
- "
- mainGroup processExposeEvents
- ]
- ]
- ].
- ].
- ].
+ thisProcess setStateTo:#eventWait if:#active.
+ gotSema := waitSema wait.
+ LastActiveGroup := self.
+ LastActiveProcess := thisProcess.
+ gotSema == mySema ifTrue:[
+ self processEvents
+ ] ifFalse:[
+ mainGroup topViews notNil ifTrue:[
+ mainView := mainGroup topViews first
+ ].
+ mainView notNil ifTrue:[
+ (mainGroup sensor hasConfigureEventFor:mainView) ifTrue:[
+ topViews first raiseDeiconified
+ ]
+ ].
+ "
+ if modal, also check for redraw events in my maingroup
+ (we arrive here after we woke up on maingroup sensor eventSemaphore)
+ "
+ mainGroup processExposeEvents.
+ ]
+ ]
+ ].
+ ].
+ ].
] valueNowOrOnUnwindDo:[
- cleanupActions notNil ifTrue:[cleanupActions value]
+ cleanupActions notNil ifTrue:[cleanupActions value]
]
"Modified: 14.12.1995 / 11:12:24 / stefan"
@@ -1149,6 +1157,24 @@
!WindowGroup methodsFor:'special accessing'!
+isForModalSubview
+ "special for windowgroups for modal subviews.
+ These must be flagged specially to avoid the views being reassigned
+ to the maingroup.
+ This is a private interface to the SimpleView class"
+
+ ^ isForModalSubview
+!
+
+isForModalSubview:aBoolean
+ "special for windowgroups for modal subviews.
+ These must be flagged specially to avoid the views being reassigned
+ to the maingroup.
+ This is a private interface to the SimpleView class"
+
+ isForModalSubview := aBoolean
+!
+
setModal:aBoolean
"special entry for debugger: set the modal flag.
Not for public use"
@@ -1175,29 +1201,11 @@
myProcess := aProcess
"Modified: 3.9.1995 / 14:25:38 / claus"
-!
-
-isForModalSubview:aBoolean
- "special for windowgroups for modal subviews.
- These must be flagged specially to avoid the views being reassigned
- to the maingroup.
- This is a private interface to the SimpleView class"
-
- isForModalSubview := aBoolean
-!
-
-isForModalSubview
- "special for windowgroups for modal subviews.
- These must be flagged specially to avoid the views being reassigned
- to the maingroup.
- This is a private interface to the SimpleView class"
-
- ^ isForModalSubview
! !
!WindowGroup class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.66 1996-02-08 19:28:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.67 1996-02-20 18:59:44 werner Exp $'
! !
WindowGroup initialize!