diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-07 17:55:08 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-11 16:03:02 +0100 |
commit | 2a68cffa843572b2a90780758c5c4eaa7c694c48 (patch) | |
tree | 4840f927ebeb729d37236a87c67c442c53526698 | |
parent | c5042d68eaf8ca360c3183e284b200d58d1a0479 (diff) | |
download | qtbase-2a68cffa843572b2a90780758c5c4eaa7c694c48.tar.gz qtbase-2a68cffa843572b2a90780758c5c4eaa7c694c48.tar.bz2 qtbase-2a68cffa843572b2a90780758c5c4eaa7c694c48.zip |
Accessibility Linux: Report Active state
The fixme comment is invalid since QAccessibleWidget actually checks for
isWindow and sets the active state.
This is messed up because in Qt 4 there was a work-around to set active
for windows in a different code path.
[ChangeLog][QtGui] Accessibility on Linux now reports the active state
correctly.
Change-Id: I9e2cf436b3ffa7ef28286ee49d6e582f179930c6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
-rw-r--r-- | src/platformsupport/linuxaccessibility/atspiadaptor.cpp | 7 | ||||
-rw-r--r-- | src/platformsupport/linuxaccessibility/constant_mappings.cpp | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp index 8850f18bab..1ccab0a859 100644 --- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp +++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp @@ -1391,13 +1391,6 @@ bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QS if (interface->tableInterface()) { setSpiStateBit(&spiState, ATSPI_STATE_MANAGES_DESCENDANTS); } -// FIXME: figure out if this is a top level window and set its active state accordingly -// if (interface->object() && interface->object()->isWidgetType()) { -// QWidget *w = qobject_cast<QWidget*>(interface->object()); -// if (w->topLevelWidget() && w->isActiveWindow()) { -// setSpiStateBit(&spiState, ATSPI_STATE_ACTIVE); -// } -// } QAccessible::Role role = interface->role(); if (role == QAccessible::TreeItem || role == QAccessible::ListItem) { diff --git a/src/platformsupport/linuxaccessibility/constant_mappings.cpp b/src/platformsupport/linuxaccessibility/constant_mappings.cpp index f8bfaf4753..9de667158b 100644 --- a/src/platformsupport/linuxaccessibility/constant_mappings.cpp +++ b/src/platformsupport/linuxaccessibility/constant_mappings.cpp @@ -61,6 +61,8 @@ quint64 spiStatesFromQState(QAccessible::State state) { quint64 spiState = 0; + if (state.active) + setSpiStateBit(&spiState, ATSPI_STATE_ACTIVE); if (state.editable) setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE); if (!state.disabled) { |