summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorStephan Schäfer <ssa@openoffice.org>2002-06-10 14:35:15 +0000
committerStephan Schäfer <ssa@openoffice.org>2002-06-10 14:35:15 +0000
commitbd217a4aa96178aac4a943d23a1d42c1f62df667 (patch)
tree4a96965ed53caf0ab756661a92da996286677920 /toolkit
parent78a42ae590353f937b495cca2df39e52ca0e19b9 (diff)
#99526# check in focus events if window still has focus
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 238af5f4caeb..58f4f7fa353f 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: vclxaccessiblecomponent.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: ssa $ $Date: 2002-06-06 13:00:12 $
+ * last change: $Author: ssa $ $Date: 2002-06-10 15:35:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -311,8 +311,13 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind
case VCLEVENT_WINDOW_GETFOCUS:
case VCLEVENT_CONTROL_GETFOCUS:
{
- aNewValue <<= accessibility::AccessibleStateType::FOCUSED;
- NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue );
+ // if multiple listeners were registered it is possible that the
+ // focus was changed during event processing (eg SfxTopWindow )
+ if( pWindow->HasFocus() )
+ {
+ aNewValue <<= accessibility::AccessibleStateType::FOCUSED;
+ NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue );
+ }
}
break;
case VCLEVENT_WINDOW_LOSEFOCUS: