# HG changeset patch # User Claus Gittinger # Date 1041944127 -3600 # Node ID 69a0a7142c489a02f1ca3ce89eb38903d3074ba6 # Parent 84c9c261f510415a4b71e3eea0eed45dfb7d65a8 remember process which created a modal group, to allow for CTRL-C to interrupt (sub-)processes which have opened a modal window. diff -r 84c9c261f510 -r 69a0a7142c48 WindowGroup.st --- 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! diff -r 84c9c261f510 -r 69a0a7142c48 WindowSensor.st --- a/WindowSensor.st Wed Dec 18 10:22:39 2002 +0100 +++ b/WindowSensor.st Tue Jan 07 13:55:27 2003 +0100 @@ -1478,6 +1478,9 @@ group := aView windowGroup. group notNil ifTrue:[ process := group process. + process isNil ifTrue:[ + process := group creatingProcess + ]. process notNil ifTrue:[ (xlatedKey == #UserAbort) ifTrue:[ process interruptWith:[:where | AbortSignal raise] @@ -3095,7 +3098,7 @@ !WindowSensor class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.207 2002-11-26 09:13:53 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.208 2003-01-07 12:55:27 cg Exp $' ! ! WindowSensor initialize!