From 44cc60515a37587922edd5fdd9f9225ae73de8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Mill=C3=A1n=20Soto?= Date: Fri, 26 Oct 2012 16:56:00 +0200 Subject: Handle disabled state change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified AtSpiAdaptor::notify to handle enabling and disabling widgets. Change-Id: I9a23f74d891aaf123d7fc094bdf63e384e1d65fe Reviewed-by: Frederik Gladhorn Reviewed-by: Jan Arve Sæther --- src/platformsupport/linuxaccessibility/atspiadaptor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp index 506416af53..66541e6a61 100644 --- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp +++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp @@ -1094,6 +1094,13 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event) int isActive = iface->state().active; notifyStateChange(iface, QLatin1String("active"), isActive); + } else if (stateChange.disabled) { + QAIPointer iface = QAIPointer(event->accessibleInterface()); + QAccessible::State state = iface->state(); + bool enabled = !state.disabled; + + notifyStateChange(iface, QLatin1String("enabled"), enabled); + notifyStateChange(iface, QLatin1String("sensitive"), enabled); } } break; -- cgit v1.2.3