diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2012-03-13 20:25:12 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-24 17:07:52 +0100 |
commit | cea1a6bcd51a43bad6426e4de81fda117f094932 (patch) | |
tree | e059de1eee9446621bca8b46a0b5b730962a7f05 /src/gui/kernel/qwindow.cpp | |
parent | f195a8e2b69eba0e3c44f2dece222b0da9e06026 (diff) |
Make sure windows send accessibility activated updates.
Both QWindow and QWidgetWindow should update with the
active state signal.
Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index b9a3d3ac8c..7248a990d7 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -52,6 +52,7 @@ #include "qwindow_p.h" #include "qguiapplication_p.h" +#include "qaccessible.h" #include <private/qevent_p.h> @@ -1427,13 +1428,25 @@ bool QWindow::event(QEvent *ev) keyReleaseEvent(static_cast<QKeyEvent *>(ev)); break; - case QEvent::FocusIn: + case QEvent::FocusIn: { focusInEvent(static_cast<QFocusEvent *>(ev)); - break; +#ifndef QT_NO_ACCESSIBILITY + QAccessible::State state; + state.active = true; + QAccessibleStateChangeEvent event(this, state); + QAccessible::updateAccessibility(&event); +#endif + break; } - case QEvent::FocusOut: + case QEvent::FocusOut: { focusOutEvent(static_cast<QFocusEvent *>(ev)); - break; +#ifndef QT_NO_ACCESSIBILITY + QAccessible::State state; + state.active = true; + QAccessibleStateChangeEvent event(this, state); + QAccessible::updateAccessibility(&event); +#endif + break; } #ifndef QT_NO_WHEELEVENT case QEvent::Wheel: |