WindowGroup.st
changeset 3780 69a0a7142c48
parent 3777 c09c9ef205f4
child 3786 8e238ec303d8
--- a/WindowGroup.st	Wed Dec 18 10:22:39 2002 +0100
+++ b/WindowGroup.st	Tue Jan 07 13:55:27 2003 +0100
@@ -16,7 +16,8 @@
 	instanceVariableNames:'graphicsDevice views topViews myProcess mySensor isModal
 		previousGroup focusView focusSequence preEventHook postEventHook
 		pointerView isForModalSubview focusByTab groupHasFocus busyHook
-		busyHookTimeout inModalLoop preEventHooks postEventHooks'
+		busyHookTimeout inModalLoop preEventHooks postEventHooks
+		creatingProcess'
 	classVariableNames:'LastActiveGroup LastActiveProcess LeaveSignal
 		WindowGroupQuerySignal LastEventQuerySignal BusyHookTime'
 	poolDictionaries:''
@@ -445,6 +446,15 @@
 
 !WindowGroup methodsFor:'accessing'!
 
+creatingProcess
+    "return the process which created this group or nil.
+     Only returns non-nil for modal groups."
+
+    ^ creatingProcess
+
+    "Modified: / 17.8.1998 / 10:21:29 / cg"
+!
+
 device
     "return the device, we receive our events from"
 
@@ -932,9 +942,8 @@
 
 startupModal:checkBlock forGroup:mainGroup
     "startup the window-group in a modal loop 
-     (i.e. under the currently running process);
-     checkBlock is evaluated and loop is left, when false is
-     returned.
+     (i.e. under the currently running process - NOT creating a new process);
+     checkBlock is evaluated and loop is left, when false is returned.
      The mainGroup info is required to allow peeking into its
      event queue in order for its expose/redraws to be handled."
 
@@ -954,6 +963,10 @@
     ].
     isModal := true.
 
+    myProcess isNil ifTrue:[
+        creatingProcess := Processor activeProcess
+    ].
+
     mainGroup notNil ifTrue:[
         "/ tell the other group, that some modal dialog has started.
         mainGroup modalDialogStarts
@@ -2715,7 +2728,7 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.250 2002-12-10 15:59:34 penk Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.251 2003-01-07 12:55:24 cg Exp $'
 ! !
 
 WindowGroup initialize!