--- a/WindowEvent.st Sun Feb 22 03:18:06 2009 +0100
+++ b/WindowEvent.st Tue Feb 24 19:28:45 2009 +0100
@@ -1007,16 +1007,7 @@
Notice: this method might return nil, for synthetic (app-related) or display screen related
events"
- |evView group focusView|
-
- (evView := self view) notNil ifTrue:[
- group := evView windowGroup.
- group notNil ifTrue:[
- focusView := group focusView.
- focusView notNil ifTrue:[^ focusView].
- ].
- ].
- ^ evView
+ ^ self view.
! !
!WindowEvent::ApplicationEvent methodsFor:'blocked'!
@@ -1465,6 +1456,27 @@
^ true
"Created: 4.4.1997 / 13:39:59 / cg"
+!
+
+targetView
+ "return the view which will eventually handle the event;
+ for most events, this is the same as the view, for which the event was
+ originally generated.
+ Except, if an explicit focus has been assigned (i.e. tabbed into a component),
+ AND the event is a keyboard event. In this case, the targetView might be different.
+ Notice: this method might return nil, for synthetic (app-related) or display screen related
+ events"
+
+ |evView group focusView|
+
+ (evView := self view) notNil ifTrue:[
+ group := evView windowGroup.
+ group notNil ifTrue:[
+ focusView := group focusView.
+ focusView notNil ifTrue:[^ focusView].
+ ].
+ ].
+ ^ evView
! !
!WindowEvent::KeyReleaseEvent methodsFor:'queries'!
@@ -1603,7 +1615,7 @@
!WindowEvent class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.97 2008-07-23 13:47:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.98 2009-02-24 18:28:45 stefan Exp $'
! !
WindowEvent::InputEvent initialize!