diff options
Diffstat (limited to 'src/plugins/platforms/windows/accessible')
-rw-r--r-- | src/plugins/platforms/windows/accessible/iaccessible2.cpp | 3 | ||||
-rw-r--r-- | src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index 132a04dd9c..2e843ef74a 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -338,9 +338,6 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_relations(long maxRelations HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::role(long *ia2role) { accessibleDebugClientCalls(accessible); - //### Change QAccessibleInterface::role() to return both MSAA and IA2 roles. - // When that is completed, we must patch the MSAA bridge not not return any - // IA2-specific roles from get_accRole(). if (!accessible->isValid()) return E_FAIL; diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp index 6c4d217cb4..5003d9effd 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp +++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp @@ -998,8 +998,14 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::get_accRole(VARIANT varID, VAR } if (role != QAccessible::NoRole) { - if (role == QAccessible::LayeredPane) - role = QAccessible::Pane; + if (role >= QAccessible::LayeredPane) { + // This block should hopefully only be entered if the AT client + // does not support IAccessible2, since it should prefer IA2::role() then. + if (role == QAccessible::LayeredPane) + role = QAccessible::Pane; + else + role = QAccessible::Client; + } (*pvarRole).vt = VT_I4; (*pvarRole).lVal = role; } else { |