macOS Accessibility: don't create an unnecessary interface
We only need to compare elements to determine whether this element has focus. Task-number: QTBUG-34337 Pick-to: 6.5 Change-Id: Ic1388ac00381735acfbf1e5877a658f4bd534dfb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
03b7e97907
commit
69a8d1293a
@ -249,12 +249,9 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
|
||||
|
||||
- (BOOL)isAccessibilityFocused
|
||||
{
|
||||
if (QAccessibleInterface *iface = self.qtInterface) {
|
||||
// Just check if the app thinks we're focused.
|
||||
id focusedElement = NSApp.accessibilityApplicationFocusedUIElement;
|
||||
return [focusedElement isEqual:self];
|
||||
}
|
||||
return false;
|
||||
// Just check if the app thinks we're focused.
|
||||
id focusedElement = NSApp.accessibilityApplicationFocusedUIElement;
|
||||
return [focusedElement isEqual:self];
|
||||
}
|
||||
|
||||
// attributes
|
||||
|
Loading…
Reference in New Issue
Block a user