#DOCUMENTATION by exept
class: WindowGroup
comment/format in: #startupModal:forGroup:
explain focusView behavior
--- a/WindowGroup.st Sun Aug 11 11:54:20 2019 +0200
+++ b/WindowGroup.st Sun Aug 11 12:00:13 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -1154,12 +1152,17 @@
prevActiveKeyboardGrab := device activeKeyboardGrab.
prevActivePointerGrab := device activePointerGrab.
].
+ "/ Transcript showCR:'prevGroup: %1' with:prevGroup.
+ "/ Transcript showCR:'prevFocus: %1' with:prevFocus.
isModal := true.
myProcess isNil ifTrue:[
creatingProcess := Processor activeProcess
].
+ "/ the old scheme fetched the current focus before (the new does it below, after).
+ "/ this has an effect iff the opened dialog does affect the opening application
+ "/ (i.e. changes its state, by adding a view or changes its focus view).
oldFocusScheme ifTrue:[
previousGroup notNil ifTrue:[
prevFocus := previousGroup focusView.
@@ -1196,6 +1199,8 @@
].
].
+ "/ the new scheme fetches the current focus afterwards.
+ "/ in case the maingroup changed its state, by adding a view or changed its focus view.
oldFocusScheme ifFalse:[
previousGroup notNil ifTrue:[
prevFocus := previousGroup focusView.
@@ -1203,7 +1208,7 @@
].
prevFocus notNil ifTrue:[
- previousGroup focusView requestFocus
+ previousGroup focusView requestFocus.
].
prevActivePointerGrab notNil ifTrue:[ device grabPointerInView:prevActivePointerGrab ].