--- a/WindowGroup.st Sat Dec 16 02:27:44 1995 +0100
+++ b/WindowGroup.st Sat Dec 16 18:44:01 1995 +0100
@@ -648,78 +648,84 @@
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
- ].
-
- "/
- "/ on abort, stay in the event loop
- "/
- AbortSignal handle:[:ex |
- ex return
- ] do:[
- |dev gotSema|
+ (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
+ ].
- "/ no more events. Flush device output. This may produce more events.
- dev := self device.
- dev notNil ifTrue:[dev flush].
+ "/
+ "/ on abort, stay in the event loop
+ "/
+ AbortSignal handle:[:ex |
+ ex return
+ ] do:[
+ ActivityNotificationSignal handle:[:ex |
+ self showActivity:(ex errorString).
+ ex proceed.
+ ] do:[
+ |dev gotSema|
+
+ "/ 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:[
+ "
+ 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"
+ "Modified: 16.12.1995 / 18:39:03 / cg"
!
leaveEventLoop
@@ -1001,6 +1007,14 @@
].
!
+showActivity:someMessage
+ topViews notNil ifTrue:[
+ topViews first showActivity:someMessage
+ ]
+
+ "Created: 16.12.1995 / 18:39:40 / cg"
+!
+
showCursor:aCursor
"change the cursor to aCursor in all of my views."
@@ -1081,6 +1095,6 @@
!WindowGroup class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.50 1995-12-16 01:16:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.51 1995-12-16 17:44:01 cg Exp $'
! !
WindowGroup initialize!