v13.2: fix protected ivar access (@public for lastAccessibilityCursorRect)

This commit is contained in:
2026-02-26 09:09:09 +01:00
parent 46265bdaa6
commit f41fe14772

View File

@@ -2,23 +2,11 @@ From: Martin Sukany <martin@sukany.cz>
Date: Wed, 26 Feb 2026 00:00:00 +0100
Subject: [PATCH] ns: add macOS Zoom cursor tracking and VoiceOver accessibility
Implement dual accessibility support for macOS:
1. UAZoomChangeFocus() in ns_draw_window_cursor: directly tells macOS
Zoom where the cursor is, using CG coordinates.
2. Virtual accessibility tree with EmacsAccessibilityElement base class
and EmacsAccessibilityBuffer (AXTextArea per Emacs window) for
VoiceOver: text content, cursor tracking, window switch notifications.
3. EmacsView provides accessibilityBoundsForRange: for Zoom queries and
legacy parameterized attribute APIs. EmacsView acts as AXGroup
containing EmacsAccessibilityBuffer children.
Uses unsafe_unretained references and proper retain/release (MRC compatible).
Dual accessibility: UAZoomChangeFocus + virtual element tree.
MRC compatible (unsafe_unretained, proper retain/release).
---
--- a/src/nsterm.h 2026-02-26 08:46:18.118172281 +0100
+++ b/src/nsterm.h 2026-02-26 09:01:18.404357802 +0100
+++ b/src/nsterm.h 2026-02-26 09:08:57.204955708 +0100
@@ -455,6 +455,34 @@
/* ==========================================================================
@@ -54,18 +42,20 @@ Uses unsafe_unretained references and proper retain/release (MRC compatible).
The main Emacs view
========================================================================== */
@@ -471,6 +499,10 @@
@@ -471,6 +499,12 @@
#ifdef NS_IMPL_COCOA
char *old_title;
BOOL maximizing_resize;
+ NSMutableArray *accessibilityElements;
+ Lisp_Object lastSelectedWindow;
+ @public
+ NSRect lastAccessibilityCursorRect;
+ ptrdiff_t lastAccessibilityModiff;
+ @protected
#endif
BOOL font_panel_active;
NSFont *font_panel_result;
@@ -528,6 +560,12 @@
@@ -528,6 +562,12 @@
- (void)windowWillExitFullScreen;
- (void)windowDidExitFullScreen;
- (void)windowDidBecomeKey;