Windows QPA: send UIA focus notification after window activation
After a Qt application window was opened, and focus was moved to another window, and then back to the Qt application window, NVDA would only announce the window name, but not the widget focused within the window. This patch makes Qt send a notification focus for the focused widget after a window activation notification. Fixes: QTBUG-105735 Pick-to: 6.4 6.3 6.2 Change-Id: I3426b3613ae546de0ce363f9acc5d6776c99a8aa Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
3eb2918f2e
commit
3e95884081
@ -103,6 +103,10 @@ void QWindowsUiaMainProvider::notifyStateChange(QAccessibleStateChangeEvent *eve
|
||||
if (QWindowsUiaMainProvider *provider = providerForAccessible(accessible)) {
|
||||
if (accessible->state().active) {
|
||||
QWindowsUiaWrapper::instance()->raiseAutomationEvent(provider, UIA_Window_WindowOpenedEventId);
|
||||
if (QAccessibleInterface *focused = accessible->focusChild()) {
|
||||
if (QWindowsUiaMainProvider *focusedProvider = providerForAccessible(focused))
|
||||
QWindowsUiaWrapper::instance()->raiseAutomationEvent(focusedProvider, UIA_AutomationFocusChangedEventId);
|
||||
}
|
||||
} else {
|
||||
QWindowsUiaWrapper::instance()->raiseAutomationEvent(provider, UIA_Window_WindowClosedEventId);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user