WindowGroup.st
changeset 2046 abd56d83bac5
parent 1987 49cdfda40715
child 2051 323362098e21
--- a/WindowGroup.st	Thu Feb 05 17:56:38 1998 +0100
+++ b/WindowGroup.st	Thu Feb 05 20:03:38 1998 +0100
@@ -895,138 +895,138 @@
      and aBlock evaluates to true.
 
      Some signals are caught & handled: 
-	LeaveSignal forces an exit from the eventLoop;
-	AbortSignal brings us back into the loop, processing the next event;
-	ActivityNotifications send a #showActivity: if nonModal, 
-	otherwise they are ignored."
+        LeaveSignal forces an exit from the eventLoop;
+        AbortSignal brings us back into the loop, processing the next event;
+        ActivityNotifications send a #showActivity: if nonModal, 
+        otherwise they are ignored."
 
     |thisProcess sigs otherSema|
 
     thisProcess := Processor activeProcess.
 
     sigs := SignalSet 
-		with:AbortSignal 
-		with:LeaveSignal 
-		with:ActivityNotificationSignal.
+                with:AbortSignal 
+                with:LeaveSignal 
+                with:(self class activityNotificationSignal).
 
     [
-	|p g mainGroup mySema waitSema|
+        |p g mainGroup mySema waitSema|
 
-	waitSema := mySema := mySensor eventSemaphore.
+        waitSema := mySema := mySensor eventSemaphore.
 
-	isModal ifTrue:[
-	    mainGroup := self mainGroup.
-	    mainGroup == self ifTrue:[
-		mainGroup := nil
-	    ].
-	] ifFalse:[
-	    mainGroup := previousGroup
-	].
+        isModal ifTrue:[
+            mainGroup := self mainGroup.
+            mainGroup == self ifTrue:[
+                mainGroup := nil
+            ].
+        ] ifFalse:[
+            mainGroup := previousGroup
+        ].
         
-	mainGroup notNil ifTrue:[
-	    otherSema := mainGroup sensor eventSemaphore.
-	    waitSema := SemaphoreSet with:mySema with:otherSema.
-	].
+        mainGroup notNil ifTrue:[
+            otherSema := mainGroup sensor eventSemaphore.
+            waitSema := SemaphoreSet with:mySema with:otherSema.
+        ].
 
-	[aBlock value] whileTrue:[ 
-	    LastActiveGroup := self.
-	    LastActiveProcess := thisProcess.
+        [aBlock value] 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
+            ].
 
-	    sigs handle:[:ex |
-		|theSig|
+            sigs handle:[:ex |
+                |theSig|
 
-		(theSig := ex signal) == AbortSignal ifTrue:[
-		    "/
-		    "/ on abort, stay in loop
-		    "/
-		    ex return
-		].
-		theSig == LeaveSignal ifTrue:[
-		    "/
-		    "/ on leave, exit the event loop
-		    "/
-		    ^ self
-		].
+                (theSig := ex signal) == AbortSignal ifTrue:[
+                    "/
+                    "/ on abort, stay in loop
+                    "/
+                    ex return
+                ].
+                theSig == LeaveSignal ifTrue:[
+                    "/
+                    "/ on leave, exit the event loop
+                    "/
+                    ^ self
+                ].
 
-		"/ ActivityNotification
-		"/
-		"/ if I am a modal-group, let it be handled
-		"/ by the outer main-groups handler
-		"/ otherwise show the activityMessage and continue.
-		"/
-		isModal ifTrue:[
-		    ex reject
-		    "never reached"
-		].
-		self showActivity:(ex errorString).
-		ex proceed.
-	    ] do:[
-		|dev gotSema mainView|
+                "/ ActivityNotification
+                "/
+                "/ if I am a modal-group, let it be handled
+                "/ by the outer main-groups handler
+                "/ otherwise show the activityMessage and continue.
+                "/
+                isModal ifTrue:[
+                    ex reject
+                    "never reached"
+                ].
+                self showActivity:(ex errorString).
+                ex proceed.
+            ] do:[
+                |dev gotSema mainView|
 
-		"/ Flush device output before going to sleep. 
-		"/ This may produce more events to arrive.
-		"/ Q: is this still needed (see suspendAction) ?
+                "/ Flush device output before going to sleep. 
+                "/ This may produce more events to arrive.
+                "/ Q: is this still needed (see suspendAction) ?
 
 "/                dev := self graphicsDevice.
 "/                dev notNil ifTrue:[dev flush].
 
-		"/ now, wait for an event to arrive
-		thisProcess setStateTo:#eventWait if:#active.
-		gotSema := waitSema wait.
-		LastActiveGroup := self.
-		LastActiveProcess := thisProcess.
+                "/ now, wait for an event to arrive
+                thisProcess setStateTo:#eventWait if:#active.
+                gotSema := waitSema wait.
+                LastActiveGroup := self.
+                LastActiveProcess := thisProcess.
 
-		gotSema == mySema ifTrue:[
-		    "/
-		    "/ an event for me 
-		    "/
-		    self processEventsWithModalGroup:nil
-		] ifFalse:[
-		    "/
-		    "/ an event for my mainGroup 
-		    "/
-		    mainGroup topViews notNil ifTrue:[
-			mainView := mainGroup topViews first
-		    ].
-		    mainView notNil ifTrue:[
-			"/
-			"/ if anything happened to the mainGroup
-			"/ bring my own topView back to the front
-			"/ This keeps modalBoxes visible
-			"/
-			(mainGroup sensor hasConfigureEventFor:mainView) ifTrue:[
-			    topViews size > 0 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 processEventsWithModalGroup:self.
-		]
-	    ].
-	].
+                gotSema == mySema ifTrue:[
+                    "/
+                    "/ an event for me 
+                    "/
+                    self processEventsWithModalGroup:nil
+                ] ifFalse:[
+                    "/
+                    "/ an event for my mainGroup 
+                    "/
+                    mainGroup topViews notNil ifTrue:[
+                        mainView := mainGroup topViews first
+                    ].
+                    mainView notNil ifTrue:[
+                        "/
+                        "/ if anything happened to the mainGroup
+                        "/ bring my own topView back to the front
+                        "/ This keeps modalBoxes visible
+                        "/
+                        (mainGroup sensor hasConfigureEventFor:mainView) ifTrue:[
+                            topViews size > 0 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 processEventsWithModalGroup:self.
+                ]
+            ].
+        ].
     ] valueNowOrOnUnwindDo:[
-	"/
-	"/ perform any cleanupActions
-	"/
-	cleanupActions notNil ifTrue:[cleanupActions value]
+        "/
+        "/ perform any cleanupActions
+        "/
+        cleanupActions notNil ifTrue:[cleanupActions value]
     ]
 
     "Modified: 14.12.1995 / 11:12:24 / stefan"
@@ -1791,6 +1791,6 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.127 1998-01-19 16:33:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.128 1998-02-05 19:03:38 ca Exp $'
 ! !
 WindowGroup initialize!