--- a/KeyboardProcessor.st Thu Oct 17 18:47:30 2002 +0200
+++ b/KeyboardProcessor.st Thu Oct 17 18:58:19 2002 +0200
@@ -193,6 +193,7 @@
key := event key.
rawKey := event rawKey.
topView := modalTopOrNil ? view topView.
+
wg := topView windowGroup.
app := topView application.
@@ -226,9 +227,12 @@
or:[ focusView isKeyboardConsumer not
or:[ focusView isInputField ] ]
]) ifTrue:[
- ((returnIsOKInDialog ? false) and:[key == #Return]) ifTrue:[
+ ((returnIsOKInDialog ? true) and:[key == #Return]) ifTrue:[
self requestGlobalAutoAccept ifFalse:[^ true].
- app notNil ifTrue:[
+
+ "/ only care for RETURN and ESC if the window is the
+ "/ apps topView (not if its a popup or dialog of it)
+ (app notNil and:[app window == topView]) ifTrue:[
app doAccept.
] ifFalse:[
"/ oldStyle modalBox - for now, let Box handle it itself
@@ -238,8 +242,10 @@
].
].
- ((escapeIsCancelInDialog ? false) and:[key == #Escape]) ifTrue:[
- app notNil ifTrue:[
+ ((escapeIsCancelInDialog ? true) and:[key == #Escape]) ifTrue:[
+ "/ only care for RETURN and ESC if the window is the
+ "/ apps topView (not if its a popup or dialog of it)
+ (app notNil and:[app window == topView]) ifTrue:[
app doCancel.
] ifFalse:[
"/ oldStyle modalBox - for now, let Box handle it itself
@@ -312,5 +318,5 @@
!KeyboardProcessor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/KeyboardProcessor.st,v 1.28 2002-10-17 16:47:30 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/KeyboardProcessor.st,v 1.29 2002-10-17 16:58:19 ca Exp $'
! !