mirror of
https://github.com/trycua/computer.git
synced 2026-01-09 15:00:35 -06:00
fix
This commit is contained in:
@@ -530,8 +530,8 @@ class MacOSAccessibilityHandler(BaseAccessibilityHandler):
|
||||
system = AXUIElementCreateSystemWide()
|
||||
|
||||
# Get focused element directly from system-wide element
|
||||
err, focused_element = AXUIElementCopyAttributeValue(system, kAXFocusedUIElementAttribute, None)
|
||||
if err != kAXErrorSuccess or not focused_element:
|
||||
focused_element = self.get_ax_attribute(system, kAXFocusedUIElementAttribute)
|
||||
if not focused_element:
|
||||
return {"success": False, "error": "Could not get focused UI element"}
|
||||
|
||||
# Get position of focused element
|
||||
|
||||
Reference in New Issue
Block a user