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>
This commit is contained in:
parent
c5042d68ea
commit
2a68cffa84
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user