Commit Graph

57 Commits

Author SHA1 Message Date
Martin Sukany
365219c4d1 patch updated 2026-02-23 10:55:10 +01:00
87003cac96 fix: use manual y-flip instead of accessibilityConvertScreenRect:
Compilation error: EmacsView does not declare NSAccessibility conformance
so accessibilityConvertScreenRect: is not visible to the compiler.
Replaced with manual coordinate conversion:
  primaryH = NSScreen.screens.first.frame.height
  cgRect.origin.y = primaryH - cgRect.origin.y - cgRect.size.height
2026-02-23 10:28:02 +01:00
5196674d9e fix: UAZoomChangeFocus() — actual fix for macOS Zoom cursor tracking
Root cause found via research pipeline:
NSAccessibility notifications alone are insufficient for custom NSView.
macOS Zoom 'Follow keyboard focus' requires UAZoomChangeFocus() from
HIServices/UniversalAccess.h — same as iTerm2 and Chromium.

Squashed into single clean patch. 159 insertions, 2 files.
2026-02-23 10:22:59 +01:00
56db072f06 fix: add NSAccessibilityPostNotification (key missing piece)
macOS Zoom is event-driven -- it only queries AXBoundsForRange after
receiving NSAccessibilitySelectedTextChangedNotification. Previous
version implemented the bounds methods but never posted notifications,
so Zoom never triggered a cursor position query.

Added:
- NSAccessibilityPostNotification(SelectedTextChanged) in ns_draw_window_cursor
- NSAccessibilityPostNotification(FocusedUIElementChanged) in windowDidBecomeKey
- accessibilityAttributeNames + accessibilityAttributeValue: for
  NSAccessibilitySelectedTextRangeAttribute -> returns {0,0}
2026-02-23 10:03:51 +01:00
12869677e7 fix: correct hunk line count in patch (83→91) 2026-02-23 09:22:51 +01:00
ce46e5b7eb fix: add accessibilityBoundsForRange: (new NSAccessibilityProtocol) + isAccessibilityElement
Old parameterized attribute API alone insufficient — macOS Zoom prefers
the new NSAccessibilityProtocol method accessibilityBoundsForRange:.
Also adds isAccessibilityElement returning YES.

Both APIs now implemented for compatibility across macOS versions.
2026-02-23 09:19:51 +01:00
e6d6fc62fd feat: add NSAccessibility AXBoundsForRange patch for macOS Zoom cursor tracking 2026-02-22 23:31:12 +01:00