Revert "ax: fix VoiceOver cursor sync and word double-read"
This reverts commit bc5714b7b7.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From a92cfbac382d563f5d54fac32fab1711414574bb Mon Sep 17 00:00:00 2001
|
||||
From edb3a37f853fc9b98dfc96a7ba0434e87e1fdc3e Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 22:39:35 +0100
|
||||
Subject: [PATCH 0/8] ns: integrate with macOS Zoom for cursor tracking
|
||||
@@ -32,7 +32,7 @@ to the selected completion candidate after normal cursor tracking.
|
||||
3 files changed, 370 insertions(+)
|
||||
|
||||
diff --git a/etc/NEWS b/etc/NEWS
|
||||
index 7367e3ccbd..4c149e41d6 100644
|
||||
index ef36df5..80661a9 100644
|
||||
--- a/etc/NEWS
|
||||
+++ b/etc/NEWS
|
||||
@@ -82,6 +82,17 @@ other directory on your system. You can also invoke the
|
||||
@@ -54,7 +54,7 @@ index 7367e3ccbd..4c149e41d6 100644
|
||||
** 'line-spacing' now supports specifying spacing above the line.
|
||||
Previously, only spacing below the line could be specified. The user
|
||||
diff --git a/src/nsterm.h b/src/nsterm.h
|
||||
index 7c1ee4cf53..ea6e7ba4f5 100644
|
||||
index 7c1ee4c..ea6e7ba 100644
|
||||
--- a/src/nsterm.h
|
||||
+++ b/src/nsterm.h
|
||||
@@ -484,6 +484,12 @@ enum ns_return_frame_mode
|
||||
@@ -71,7 +71,7 @@ index 7c1ee4cf53..ea6e7ba4f5 100644
|
||||
}
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 932d209f56..417c312a88 100644
|
||||
index 74e4ad5..fc75910 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -71,6 +71,11 @@ Updated by Christian Limpach (chris@nice.ch)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From efe1a90a98dc725ea55bda0fa466427b39cdd253 Mon Sep 17 00:00:00 2001
|
||||
From 1ecb71555d3419523d8ccebc03ace9bffac4f99e Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 12:58:11 +0100
|
||||
Subject: [PATCH 1/8] ns: add accessibility base classes and text extraction
|
||||
@@ -29,11 +29,11 @@ ns-accessibility-enabled with corrected doc: initial value is nil,
|
||||
set non-nil automatically when an AT is detected at startup.
|
||||
---
|
||||
src/nsterm.h | 131 +++++++++++++++
|
||||
src/nsterm.m | 452 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/nsterm.m | 456 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 583 insertions(+)
|
||||
|
||||
diff --git a/src/nsterm.h b/src/nsterm.h
|
||||
index ea6e7ba4f5..5746e9e9bd 100644
|
||||
index ea6e7ba..5746e9e 100644
|
||||
--- a/src/nsterm.h
|
||||
+++ b/src/nsterm.h
|
||||
@@ -453,6 +453,124 @@ enum ns_return_frame_mode
|
||||
@@ -189,7 +189,7 @@ index ea6e7ba4f5..5746e9e9bd 100644
|
||||
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 417c312a88..a1cece7c23 100644
|
||||
index fc75910..852e7f9 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -46,6 +46,7 @@ Updated by Christian Limpach (chris@nice.ch)
|
||||
@@ -200,7 +200,7 @@ index 417c312a88..a1cece7c23 100644
|
||||
#include "systime.h"
|
||||
#include "character.h"
|
||||
#include "xwidget.h"
|
||||
@@ -7200,6 +7201,430 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
|
||||
@@ -7209,6 +7210,430 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -631,7 +631,7 @@ index 417c312a88..a1cece7c23 100644
|
||||
/* ==========================================================================
|
||||
|
||||
EmacsView implementation
|
||||
@@ -11656,6 +12081,24 @@ Convert an X font name (XLFD) to an NS font name.
|
||||
@@ -11665,6 +12090,24 @@ Convert an X font name (XLFD) to an NS font name.
|
||||
DEFSYM (Qns_drag_operation_generic, "ns-drag-operation-generic");
|
||||
DEFSYM (Qns_handle_drag_motion, "ns-handle-drag-motion");
|
||||
|
||||
@@ -656,7 +656,7 @@ index 417c312a88..a1cece7c23 100644
|
||||
Fput (Qalt, Qmodifier_value, make_fixnum (alt_modifier));
|
||||
Fput (Qhyper, Qmodifier_value, make_fixnum (hyper_modifier));
|
||||
Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier));
|
||||
@@ -11804,6 +12247,15 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
|
||||
@@ -11813,6 +12260,15 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
|
||||
This variable is ignored on Mac OS X < 10.7 and GNUstep. */);
|
||||
ns_use_srgb_colorspace = YES;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3e4f7fff7eb999c4a497ef21bf01ad41819191eb Mon Sep 17 00:00:00 2001
|
||||
From f29ed7e4e305a5f8857e72d3762d43c0901be718 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 12:58:11 +0100
|
||||
Subject: [PATCH 2/8] ns: implement buffer accessibility element (core
|
||||
@@ -23,14 +23,14 @@ loop is safe: it runs only on actual character modifications.
|
||||
(accessibilityRangeForPosition:, setAccessibilitySelectedTextRange:)
|
||||
(setAccessibilityFocused:): Implement NSAccessibility protocol methods.
|
||||
---
|
||||
src/nsterm.m | 1115 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 1115 insertions(+)
|
||||
src/nsterm.m | 1127 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 1123 insertions(+)
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index a1cece7c23..3d031ddb69 100644
|
||||
index 852e7f9..3e1ac74 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -7622,6 +7622,1121 @@ - (id)accessibilityTopLevelUIElement
|
||||
@@ -7631,6 +7631,1121 @@ - (id)accessibilityTopLevelUIElement
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 554bc4a174d0f6ec934108687da165f71ce9cf9a Mon Sep 17 00:00:00 2001
|
||||
From b4b09f69a8a4742e9f1431242d58e2c52400112c Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 12:58:11 +0100
|
||||
Subject: [PATCH 3/8] ns: add buffer notification dispatch and mode-line
|
||||
@@ -22,14 +22,14 @@ detects text edit, cursor/mark change, or overlay change.
|
||||
(EmacsAccessibilityModeLine): Implement AXStaticText element for the
|
||||
mode line.
|
||||
---
|
||||
src/nsterm.m | 605 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 605 insertions(+)
|
||||
src/nsterm.m | 546 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 546 insertions(+)
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 3d031ddb69..221697b78a 100644
|
||||
index 3e1ac74..d3015e2 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -8737,6 +8737,611 @@ - (NSRect)accessibilityFrame
|
||||
@@ -8758,6 +8758,609 @@ - (NSRect)accessibilityFrame
|
||||
|
||||
@end
|
||||
|
||||
@@ -94,7 +94,6 @@ index 3d031ddb69..221697b78a 100644
|
||||
+ granularity:(NSInteger)granularity
|
||||
+ markActive:(BOOL)markActive
|
||||
+ oldMarkActive:(BOOL)oldMarkActive
|
||||
+ emacsInitiated:(BOOL)emacsInitiated
|
||||
+{
|
||||
+ BOOL isCharMove
|
||||
+ = (!markActive && !oldMarkActive
|
||||
@@ -164,7 +163,7 @@ index 3d031ddb69..221697b78a 100644
|
||||
+ BOOL isWordMove
|
||||
+ = (!markActive && !oldMarkActive
|
||||
+ && granularity == ns_ax_text_selection_granularity_word
|
||||
+ && emacsInitiated);
|
||||
+ && direction == ns_ax_text_selection_direction_discontiguous);
|
||||
+ if (isWordMove && cachedText)
|
||||
+ {
|
||||
+ NSCharacterSet *ws
|
||||
@@ -532,8 +531,7 @@ index 3d031ddb69..221697b78a 100644
|
||||
+ direction:direction
|
||||
+ granularity:granularity
|
||||
+ markActive:markActive
|
||||
+ oldMarkActive:oldMarkActive
|
||||
+ emacsInitiated:NO];
|
||||
+ oldMarkActive:oldMarkActive];
|
||||
+
|
||||
+ if (![self isAccessibilityFocused] && cachedText)
|
||||
+ [self postCompletionAnnouncementForBuffer:b point:point];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e2e327e374445912764bf3efb4dd65af9a238a41 Mon Sep 17 00:00:00 2001
|
||||
From 1ce902a7a0b0d4d63e9d9f8718145d183a3c5d1a Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 12:58:11 +0100
|
||||
Subject: [PATCH 4/8] ns: add interactive span elements for Tab navigation
|
||||
@@ -18,10 +18,10 @@ rebuilding lazily when interactiveSpansDirty is set.
|
||||
1 file changed, 287 insertions(+)
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 221697b78a..70ec4286bf 100644
|
||||
index d3015e2..6d3b87a 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -9342,6 +9342,293 @@ - (NSRect)accessibilityFrame
|
||||
@@ -9304,6 +9304,293 @@ - (NSRect)accessibilityFrame
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d1adda245af7b5a2b8bc3b0c738f661dcc78b626 Mon Sep 17 00:00:00 2001
|
||||
From 6e6c5f4cf33d302e23141ce241c1747cdc0304be Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 12:58:11 +0100
|
||||
Subject: [PATCH 5/8] ns: integrate accessibility with EmacsView and redisplay
|
||||
@@ -27,10 +27,10 @@ com.apple.accessibility.api distributed notification.
|
||||
2 files changed, 431 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/etc/NEWS b/etc/NEWS
|
||||
index 4c149e41d6..7f917f93b2 100644
|
||||
index 80661a9..2b1f9e6 100644
|
||||
--- a/etc/NEWS
|
||||
+++ b/etc/NEWS
|
||||
@@ -4385,6 +4385,19 @@ allowing Emacs users access to speech recognition utilities.
|
||||
@@ -4400,6 +4400,19 @@ allowing Emacs users access to speech recognition utilities.
|
||||
Note: Accepting this permission allows the use of system APIs, which may
|
||||
send user data to Apple's speech recognition servers.
|
||||
|
||||
@@ -51,7 +51,7 @@ index 4c149e41d6..7f917f93b2 100644
|
||||
** Re-introduced dictation, lost in Emacs v30 (macOS).
|
||||
We lost macOS dictation in v30 when migrating to NSTextInputClient.
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 70ec4286bf..1444ff2d13 100644
|
||||
index 6d3b87a..7574da4 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -1275,7 +1275,7 @@ If a completion candidate is selected (overlay or child frame),
|
||||
@@ -92,7 +92,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
{
|
||||
NSRect windowRect = [view convertRect:r toView:nil];
|
||||
NSRect screenRect
|
||||
@@ -6722,9 +6726,56 @@ - (void)applicationDidFinishLaunching: (NSNotification *)notification
|
||||
@@ -6731,9 +6735,56 @@ - (void)applicationDidFinishLaunching: (NSNotification *)notification
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -149,7 +149,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
- (void)antialiasThresholdDidChange:(NSNotification *)notification
|
||||
{
|
||||
#ifdef NS_IMPL_COCOA
|
||||
@@ -7625,7 +7676,6 @@ - (id)accessibilityTopLevelUIElement
|
||||
@@ -7634,7 +7685,6 @@ - (id)accessibilityTopLevelUIElement
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
static BOOL
|
||||
ns_ax_find_completion_overlay_range (struct buffer *b, ptrdiff_t point,
|
||||
ptrdiff_t *out_start,
|
||||
@@ -8738,7 +8788,6 @@ - (NSRect)accessibilityFrame
|
||||
@@ -8759,7 +8809,6 @@ - (NSRect)accessibilityFrame
|
||||
@end
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
/* ===================================================================
|
||||
EmacsAccessibilityBuffer (Notifications) — AX event dispatch
|
||||
|
||||
@@ -9343,7 +9392,6 @@ - (NSRect)accessibilityFrame
|
||||
@@ -9305,7 +9354,6 @@ - (NSRect)accessibilityFrame
|
||||
@end
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
/* ===================================================================
|
||||
EmacsAccessibilityInteractiveSpan — helpers and implementation
|
||||
=================================================================== */
|
||||
@@ -9674,6 +9722,7 @@ - (void)dealloc
|
||||
@@ -9636,6 +9684,7 @@ - (void)dealloc
|
||||
[layer release];
|
||||
#endif
|
||||
|
||||
@@ -181,7 +181,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
[[self menu] release];
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -11022,6 +11071,32 @@ - (void)windowDidBecomeKey /* for direct calls */
|
||||
@@ -10984,6 +11033,32 @@ - (void)windowDidBecomeKey /* for direct calls */
|
||||
XSETFRAME (event.frame_or_window, emacsframe);
|
||||
kbd_buffer_store_event (&event);
|
||||
ns_send_appdefined (-1); // Kick main loop
|
||||
@@ -214,7 +214,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -12259,6 +12334,332 @@ - (int) fullscreenState
|
||||
@@ -12221,6 +12296,332 @@ - (int) fullscreenState
|
||||
return fs_state;
|
||||
}
|
||||
|
||||
@@ -547,7 +547,7 @@ index 70ec4286bf..1444ff2d13 100644
|
||||
@end /* EmacsView */
|
||||
|
||||
|
||||
@@ -14255,12 +14656,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
|
||||
@@ -14221,12 +14622,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
|
||||
ns_use_srgb_colorspace = YES;
|
||||
|
||||
DEFVAR_BOOL ("ns-accessibility-enabled", ns_accessibility_enabled,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 9703257f348868b6d28ffb07a32515be05180ab3 Mon Sep 17 00:00:00 2001
|
||||
From cd2037fc2078f3db365fa3f222413d9022c882f5 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 12:58:11 +0100
|
||||
Subject: [PATCH 6/8] doc: add VoiceOver accessibility section to macOS
|
||||
@@ -16,7 +16,7 @@ default: initial value is nil, set automatically at startup.
|
||||
2 files changed, 83 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
|
||||
index 6bd334f48e..f3671354b5 100644
|
||||
index 6bd334f..6514dfc 100644
|
||||
--- a/doc/emacs/macos.texi
|
||||
+++ b/doc/emacs/macos.texi
|
||||
@@ -36,6 +36,7 @@ Support}), but we hope to improve it in the future.
|
||||
@@ -110,10 +110,10 @@ index 6bd334f48e..f3671354b5 100644
|
||||
@section GNUstep Support
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 1444ff2d13..25e8aeff34 100644
|
||||
index 7574da4..426b029 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -14657,9 +14657,13 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
|
||||
@@ -14623,9 +14623,13 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
|
||||
|
||||
DEFVAR_BOOL ("ns-accessibility-enabled", ns_accessibility_enabled,
|
||||
doc: /* Non-nil enables Zoom cursor tracking and VoiceOver support.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 825b4ff19bbaab392aa11fcd3ce41bfef248eb7b Mon Sep 17 00:00:00 2001
|
||||
From c777281b5f05b463ec4bb8bdcb71bdcf400a10c6 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 14:46:25 +0100
|
||||
Subject: [PATCH 7/8] ns: announce overlay completion candidates for VoiceOver
|
||||
@@ -22,7 +22,7 @@ race where an AX query consumes the change before notification.
|
||||
2 files changed, 289 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/src/nsterm.h b/src/nsterm.h
|
||||
index 5746e9e9bd..21a93bc799 100644
|
||||
index 5746e9e..21a93bc 100644
|
||||
--- a/src/nsterm.h
|
||||
+++ b/src/nsterm.h
|
||||
@@ -510,6 +510,7 @@ typedef struct ns_ax_visible_run
|
||||
@@ -34,10 +34,10 @@ index 5746e9e9bd..21a93bc799 100644
|
||||
@property (nonatomic, assign) BOOL cachedMarkActive;
|
||||
@property (nonatomic, copy) NSString *cachedCompletionAnnouncement;
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 25e8aeff34..b3daec31f1 100644
|
||||
index 426b029..8d44b5f 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -7262,11 +7262,154 @@ Accessibility virtual elements (macOS / Cocoa only)
|
||||
@@ -7271,11 +7271,154 @@ Accessibility virtual elements (macOS / Cocoa only)
|
||||
|
||||
/* ---- Helper: extract buffer text for accessibility ---- */
|
||||
|
||||
@@ -193,7 +193,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
static NSString *
|
||||
ns_ax_buffer_text (struct window *w, ptrdiff_t *out_start,
|
||||
ns_ax_visible_run **out_runs, NSUInteger *out_nruns)
|
||||
@@ -7337,7 +7480,7 @@ Accessibility virtual elements (macOS / Cocoa only)
|
||||
@@ -7346,7 +7489,7 @@ Accessibility virtual elements (macOS / Cocoa only)
|
||||
|
||||
/* Extract this visible run's text. Use
|
||||
Fbuffer_substring_no_properties which correctly handles the
|
||||
@@ -202,7 +202,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
include garbage bytes when the run spans the gap position. */
|
||||
Lisp_Object lstr = Fbuffer_substring_no_properties (
|
||||
make_fixnum (pos), make_fixnum (run_end));
|
||||
@@ -7418,7 +7561,7 @@ Mode lines using icon fonts (e.g. nerd-font icons)
|
||||
@@ -7427,7 +7570,7 @@ Mode lines using icon fonts (e.g. nerd-font icons)
|
||||
return NSZeroRect;
|
||||
|
||||
/* charpos_start and charpos_len are already in buffer charpos
|
||||
@@ -211,7 +211,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
charposForAccessibilityIndex which handles invisible text. */
|
||||
ptrdiff_t cp_start = charpos_start;
|
||||
ptrdiff_t cp_end = cp_start + charpos_len;
|
||||
@@ -7893,6 +8036,7 @@ @implementation EmacsAccessibilityBuffer
|
||||
@@ -7906,6 +8049,7 @@ @implementation EmacsAccessibilityBuffer
|
||||
@synthesize cachedOverlayModiff;
|
||||
@synthesize cachedTextStart;
|
||||
@synthesize cachedModiff;
|
||||
@@ -219,7 +219,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
@synthesize cachedPoint;
|
||||
@synthesize cachedMarkActive;
|
||||
@synthesize cachedCompletionAnnouncement;
|
||||
@@ -7990,7 +8134,7 @@ - (void)ensureTextCache
|
||||
@@ -8003,7 +8147,7 @@ - (void)ensureTextCache
|
||||
NSTRACE ("EmacsAccessibilityBuffer ensureTextCache");
|
||||
/* This method is only called from the main thread (AX getters
|
||||
dispatch_sync to main first). Reads of cachedText/cachedTextModiff
|
||||
@@ -228,7 +228,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
write section at the end needs synchronization to protect
|
||||
against concurrent reads from AX server thread. */
|
||||
eassert ([NSThread isMainThread]);
|
||||
@@ -8002,25 +8146,16 @@ - (void)ensureTextCache
|
||||
@@ -8015,25 +8159,16 @@ - (void)ensureTextCache
|
||||
if (!b)
|
||||
return;
|
||||
|
||||
@@ -262,7 +262,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
&& cachedTextStart == BUF_BEGV (b)
|
||||
&& pt >= cachedTextStart
|
||||
&& (textLen == 0
|
||||
@@ -8036,7 +8171,7 @@ included in the cached AX text (it is handled separately via
|
||||
@@ -8049,7 +8184,7 @@ included in the cached AX text (it is handled separately via
|
||||
{
|
||||
[cachedText release];
|
||||
cachedText = [text retain];
|
||||
@@ -271,7 +271,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
cachedTextStart = start;
|
||||
|
||||
if (visibleRuns)
|
||||
@@ -8105,7 +8240,7 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
|
||||
@@ -8118,7 +8253,7 @@ - (NSUInteger)accessibilityIndexForCharpos:(ptrdiff_t)charpos
|
||||
/* Binary search: runs are sorted by charpos (ascending). Find the
|
||||
run whose [charpos, charpos+length) range contains the target,
|
||||
or the nearest run after an invisible gap. O(log n) instead of
|
||||
@@ -280,7 +280,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
NSUInteger lo = 0, hi = visibleRunCount;
|
||||
while (lo < hi)
|
||||
{
|
||||
@@ -8154,10 +8289,10 @@ by run length (visible window), not total buffer size. */
|
||||
@@ -8167,10 +8302,10 @@ by run length (visible window), not total buffer size. */
|
||||
|
||||
/* Convert accessibility string index to buffer charpos.
|
||||
Safe to call from any thread: uses only cachedText (NSString) and
|
||||
@@ -293,7 +293,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
@synchronized (self)
|
||||
{
|
||||
if (visibleRunCount == 0)
|
||||
@@ -8199,7 +8334,7 @@ the slow path (composed character sequence walk), which is
|
||||
@@ -8212,7 +8347,7 @@ the slow path (composed character sequence walk), which is
|
||||
return cp;
|
||||
}
|
||||
}
|
||||
@@ -302,7 +302,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
if (lo > 0)
|
||||
{
|
||||
ns_ax_visible_run *last = &visibleRuns[visibleRunCount - 1];
|
||||
@@ -8221,7 +8356,7 @@ the slow path (composed character sequence walk), which is
|
||||
@@ -8234,7 +8369,7 @@ the slow path (composed character sequence walk), which is
|
||||
deadlocking the AX server thread. This is prevented by:
|
||||
|
||||
1. validWindow checks WINDOW_LIVE_P and BUFFERP before every
|
||||
@@ -311,7 +311,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
2. All dispatch_sync blocks run on the main thread where no
|
||||
concurrent Lisp code can modify state between checks.
|
||||
3. block_input prevents timer events and process output from
|
||||
@@ -8567,6 +8702,50 @@ - (NSInteger)accessibilityInsertionPointLineNumber
|
||||
@@ -8588,6 +8723,50 @@ - (NSInteger)accessibilityInsertionPointLineNumber
|
||||
return [self lineForAXIndex:point_idx];
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
- (NSRange)accessibilityRangeForLine:(NSInteger)line
|
||||
{
|
||||
if (![NSThread isMainThread])
|
||||
@@ -8789,7 +8968,7 @@ - (NSRect)accessibilityFrame
|
||||
@@ -8810,7 +8989,7 @@ - (NSRect)accessibilityFrame
|
||||
|
||||
|
||||
/* ===================================================================
|
||||
@@ -371,7 +371,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
|
||||
These methods notify VoiceOver of text and selection changes.
|
||||
Called from the redisplay cycle (postAccessibilityUpdates).
|
||||
@@ -8804,7 +8983,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
|
||||
@@ -8825,7 +9004,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
|
||||
if (point > self.cachedPoint
|
||||
&& point - self.cachedPoint == 1)
|
||||
{
|
||||
@@ -380,7 +380,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
[self invalidateTextCache];
|
||||
[self ensureTextCache];
|
||||
if (cachedText)
|
||||
@@ -8823,7 +9002,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
|
||||
@@ -8844,7 +9023,7 @@ - (void)postTextChangedNotification:(ptrdiff_t)point
|
||||
/* Update cachedPoint here so the selection-move branch does NOT
|
||||
fire for point changes caused by edits. WebKit and Chromium
|
||||
never send both ValueChanged and SelectedTextChanged for the
|
||||
@@ -389,7 +389,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
self.cachedPoint = point;
|
||||
|
||||
NSDictionary *change = @{
|
||||
@@ -9215,16 +9394,83 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
||||
@@ -9178,16 +9357,83 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
||||
BOOL markActive = !NILP (BVAR (b, mark_active));
|
||||
|
||||
/* --- Text changed (edit) --- */
|
||||
@@ -477,7 +477,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
{
|
||||
ptrdiff_t oldPoint = self.cachedPoint;
|
||||
BOOL oldMarkActive = self.cachedMarkActive;
|
||||
@@ -9393,7 +9639,7 @@ - (NSRect)accessibilityFrame
|
||||
@@ -9355,7 +9601,7 @@ - (NSRect)accessibilityFrame
|
||||
|
||||
|
||||
/* ===================================================================
|
||||
@@ -486,7 +486,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
=================================================================== */
|
||||
|
||||
/* Scan visible range of window W for interactive spans.
|
||||
@@ -9602,7 +9848,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
|
||||
@@ -9564,7 +9810,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
|
||||
dispatch_async (dispatch_get_main_queue (), ^{
|
||||
/* lwin is a Lisp_Object captured by value. This is GC-safe
|
||||
because Lisp_Objects are tagged integers/pointers that
|
||||
@@ -495,7 +495,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
Emacs. The WINDOW_LIVE_P check below guards against the
|
||||
window being deleted between capture and execution. */
|
||||
if (!WINDOWP (lwin) || NILP (Fwindow_live_p (lwin)))
|
||||
@@ -9628,7 +9874,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
|
||||
@@ -9590,7 +9836,7 @@ - (void) setAccessibilityFocused: (BOOL) focused
|
||||
|
||||
@end
|
||||
|
||||
@@ -504,7 +504,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
Methods are kept here (same .m file) so they access the ivars
|
||||
declared in the @interface ivar block. */
|
||||
@implementation EmacsAccessibilityBuffer (InteractiveSpans)
|
||||
@@ -12350,7 +12596,7 @@ - (int) fullscreenState
|
||||
@@ -12312,7 +12558,7 @@ - (int) fullscreenState
|
||||
|
||||
if (WINDOW_LEAF_P (w))
|
||||
{
|
||||
@@ -513,7 +513,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
EmacsAccessibilityBuffer *elem
|
||||
= [existing objectForKey:[NSValue valueWithPointer:w]];
|
||||
if (!elem)
|
||||
@@ -12384,7 +12630,7 @@ - (int) fullscreenState
|
||||
@@ -12346,7 +12592,7 @@ - (int) fullscreenState
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -522,7 +522,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
Lisp_Object child = w->contents;
|
||||
while (!NILP (child))
|
||||
{
|
||||
@@ -12496,7 +12742,7 @@ - (void)postAccessibilityUpdates
|
||||
@@ -12458,7 +12704,7 @@ - (void)postAccessibilityUpdates
|
||||
accessibilityUpdating = YES;
|
||||
|
||||
/* Detect window tree change (split, delete, new buffer). Compare
|
||||
@@ -531,7 +531,7 @@ index 25e8aeff34..b3daec31f1 100644
|
||||
Lisp_Object curRoot = FRAME_ROOT_WINDOW (emacsframe);
|
||||
if (!EQ (curRoot, lastRootWindow))
|
||||
{
|
||||
@@ -12505,12 +12751,12 @@ - (void)postAccessibilityUpdates
|
||||
@@ -12467,12 +12713,12 @@ - (void)postAccessibilityUpdates
|
||||
}
|
||||
|
||||
/* If tree is stale, rebuild FIRST so we don't iterate freed
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a6249e8ad3512f1e80e509c21111f6e3a241405f Mon Sep 17 00:00:00 2001
|
||||
From 830710de8a7bac560d71ae802dcf7df60517c57b Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 16:01:29 +0100
|
||||
Subject: [PATCH 8/8] ns: announce child frame completion candidates for
|
||||
@@ -20,11 +20,11 @@ element when a child frame completion closes.
|
||||
doc/emacs/macos.texi | 18 +-
|
||||
etc/NEWS | 18 +-
|
||||
src/nsterm.h | 21 ++
|
||||
src/nsterm.m | 505 +++++++++++++++++++++++++++++++++++++++----
|
||||
4 files changed, 509 insertions(+), 53 deletions(-)
|
||||
src/nsterm.m | 496 +++++++++++++++++++++++++++++++++++++++----
|
||||
4 files changed, 501 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
|
||||
index f3671354b5..03a657f970 100644
|
||||
index 6514dfc..bcf74b3 100644
|
||||
--- a/doc/emacs/macos.texi
|
||||
+++ b/doc/emacs/macos.texi
|
||||
@@ -278,7 +278,6 @@ restart Emacs to access newly-available services.
|
||||
@@ -67,10 +67,10 @@ index f3671354b5..03a657f970 100644
|
||||
correctly: character navigation announces the character at the cursor
|
||||
position, not the character before it.
|
||||
diff --git a/etc/NEWS b/etc/NEWS
|
||||
index 7f917f93b2..d7631fa6c7 100644
|
||||
index 2b1f9e6..5766428 100644
|
||||
--- a/etc/NEWS
|
||||
+++ b/etc/NEWS
|
||||
@@ -4385,16 +4385,20 @@ allowing Emacs users access to speech recognition utilities.
|
||||
@@ -4400,15 +4400,19 @@ allowing Emacs users access to speech recognition utilities.
|
||||
Note: Accepting this permission allows the use of system APIs, which may
|
||||
send user data to Apple's speech recognition servers.
|
||||
|
||||
@@ -99,7 +99,7 @@ index 7f917f93b2..d7631fa6c7 100644
|
||||
interface and eliminate the associated overhead.
|
||||
|
||||
diff --git a/src/nsterm.h b/src/nsterm.h
|
||||
index 21a93bc799..d435e42998 100644
|
||||
index 21a93bc..d435e42 100644
|
||||
--- a/src/nsterm.h
|
||||
+++ b/src/nsterm.h
|
||||
@@ -504,9 +504,21 @@ typedef struct ns_ax_visible_run
|
||||
@@ -148,7 +148,7 @@ index 21a93bc799..d435e42998 100644
|
||||
@end
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index b3daec31f1..33b72a0825 100644
|
||||
index 8d44b5f..29b646d 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -1126,24 +1126,19 @@ Uses CFAbsoluteTimeGetCurrent() (~5 ns, a VDSO read) for timing. */
|
||||
@@ -199,7 +199,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
}
|
||||
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 */
|
||||
@@ -7406,6 +7407,112 @@ visual line index for Zoom (skip whitespace-only lines
|
||||
@@ -7415,6 +7416,112 @@ visual line index for Zoom (skip whitespace-only lines
|
||||
|
||||
return nil;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
/* Build accessibility text for window W, skipping invisible text.
|
||||
Populates *OUT_START with the buffer start charpos.
|
||||
Populates *OUT_RUNS with an array of visible runs and *OUT_NRUNS
|
||||
@@ -8033,6 +8140,7 @@ that remapped bindings (e.g., C-j -> next-line) are recognized.
|
||||
@@ -8046,6 +8153,7 @@ that remapped bindings (e.g., C-j -> next-line) are recognized.
|
||||
@implementation EmacsAccessibilityBuffer
|
||||
@synthesize cachedText;
|
||||
@synthesize cachedTextModiff;
|
||||
@@ -320,7 +320,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
@synthesize cachedOverlayModiff;
|
||||
@synthesize cachedTextStart;
|
||||
@synthesize cachedModiff;
|
||||
@@ -8146,16 +8254,34 @@ - (void)ensureTextCache
|
||||
@@ -8159,16 +8267,34 @@ - (void)ensureTextCache
|
||||
if (!b)
|
||||
return;
|
||||
|
||||
@@ -363,7 +363,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
&& cachedTextStart == BUF_BEGV (b)
|
||||
&& pt >= cachedTextStart
|
||||
&& (textLen == 0
|
||||
@@ -8171,7 +8297,8 @@ included in the cached AX text (it is handled separately via
|
||||
@@ -8184,7 +8310,8 @@ included in the cached AX text (it is handled separately via
|
||||
{
|
||||
[cachedText release];
|
||||
cachedText = [text retain];
|
||||
@@ -373,7 +373,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
cachedTextStart = start;
|
||||
|
||||
if (visibleRuns)
|
||||
@@ -8584,6 +8711,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
||||
@@ -8597,6 +8724,11 @@ - (void)setAccessibilitySelectedTextRange:(NSRange)range
|
||||
|
||||
[self ensureTextCache];
|
||||
|
||||
@@ -385,7 +385,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
specpdl_ref count = SPECPDL_INDEX ();
|
||||
record_unwind_current_buffer ();
|
||||
/* Ensure block_input is always matched by unblock_input even if
|
||||
@@ -9040,11 +9172,14 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
|
||||
@@ -9064,11 +9196,13 @@ - (void)postFocusedCursorNotification:(ptrdiff_t)point
|
||||
= @(ns_ax_text_state_change_selection_move);
|
||||
moveInfo[@"AXTextSelectionDirection"] = @(direction);
|
||||
moveInfo[@"AXTextChangeElement"] = self;
|
||||
@@ -394,18 +394,17 @@ index b3daec31f1..33b72a0825 100644
|
||||
- for block-cursor mode). Include it for word/line/
|
||||
- selection so VoiceOver reads the appropriate text. */
|
||||
- if (!isCharMove)
|
||||
+ /* Include granularity for sequential VO-initiated moves so VoiceOver
|
||||
+ reads the appropriate unit. Omit for character moves (announced
|
||||
+ explicitly below), discontiguous jumps (destination line announced
|
||||
+ explicitly), and Emacs-initiated moves (announced explicitly;
|
||||
+ including granularity would cause VoiceOver to auto-speak,
|
||||
+ doubling the explicit announcement). */
|
||||
+ if (!isCharMove && !emacsInitiated
|
||||
+ /* Include granularity for sequential moves so VoiceOver reads the
|
||||
+ appropriate unit. Omit for character moves (announced explicitly
|
||||
+ below) and for discontiguous jumps (destination line announced
|
||||
+ explicitly; omitting granularity lets VoiceOver use its default
|
||||
+ behaviour and re-anchor its browse cursor). */
|
||||
+ if (!isCharMove
|
||||
+ && direction != ns_ax_text_selection_direction_discontiguous)
|
||||
moveInfo[@"AXTextSelectionGranularity"] = @(granularity);
|
||||
|
||||
ns_ax_post_notification_with_info (
|
||||
@@ -9145,12 +9280,17 @@ user expectation ("w" jumps to next word and reads it). */
|
||||
@@ -9111,12 +9245,17 @@ derive its own speech (it would read the wrong character
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,7 +427,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
if (cachedText
|
||||
&& granularity == ns_ax_text_selection_granularity_line)
|
||||
{
|
||||
@@ -9213,7 +9353,14 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
@@ -9179,7 +9318,14 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
ptrdiff_t currentOverlayStart = 0;
|
||||
ptrdiff_t currentOverlayEnd = 0;
|
||||
|
||||
@@ -443,7 +442,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
record_unwind_current_buffer ();
|
||||
if (b != current_buffer)
|
||||
set_buffer_internal_1 (b);
|
||||
@@ -9389,12 +9536,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
||||
@@ -9356,12 +9502,29 @@ - (void)postAccessibilityNotificationsForFrame:(struct frame *)f
|
||||
if (!b)
|
||||
return;
|
||||
|
||||
@@ -473,7 +472,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
if (modiff != self.cachedModiff)
|
||||
{
|
||||
self.cachedModiff = modiff;
|
||||
@@ -9408,6 +9572,7 @@ Text property changes (e.g. face updates from
|
||||
@@ -9375,6 +9538,7 @@ Text property changes (e.g. face updates from
|
||||
{
|
||||
self.cachedCharsModiff = chars_modiff;
|
||||
[self postTextChangedNotification:point];
|
||||
@@ -481,7 +480,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9430,8 +9595,15 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
@@ -9397,8 +9561,15 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
displayed in the minibuffer. In normal editing buffers,
|
||||
font-lock and other modes change BUF_OVERLAY_MODIFF on
|
||||
every redisplay, triggering O(overlays) work per keystroke.
|
||||
@@ -499,7 +498,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
goto skip_overlay_scan;
|
||||
|
||||
int selected_line = -1;
|
||||
@@ -9477,7 +9649,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
@@ -9444,7 +9615,18 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
self.cachedPoint = point;
|
||||
self.cachedMarkActive = markActive;
|
||||
|
||||
@@ -519,7 +518,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
NSInteger direction = ns_ax_text_selection_direction_discontiguous;
|
||||
if (point > oldPoint)
|
||||
direction = ns_ax_text_selection_direction_next;
|
||||
@@ -9525,6 +9708,30 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
@@ -9492,6 +9674,36 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
granularity = ns_ax_text_selection_granularity_line;
|
||||
}
|
||||
|
||||
@@ -533,33 +532,30 @@ index b3daec31f1..33b72a0825 100644
|
||||
+ if (!isCtrlNP && granularity == ns_ax_text_selection_granularity_line)
|
||||
+ direction = ns_ax_text_selection_direction_discontiguous;
|
||||
+
|
||||
+ /* If Emacs moved the cursor (not VoiceOver) and the move
|
||||
+ crosses a line boundary or jumps to an unknown position, force
|
||||
+ discontiguous so VoiceOver re-anchors its browse cursor.
|
||||
+ For character and word moves within a line, keep the natural
|
||||
+ next/previous direction: SelectedTextChanged with direction=next
|
||||
+ advances VoiceOver's browse cursor sequentially, and the explicit
|
||||
+ announcement in postFocusedCursorNotification provides speech.
|
||||
+ /* If Emacs moved the cursor (not VoiceOver), force discontiguous
|
||||
+ so VoiceOver re-anchors its browse cursor to the current
|
||||
+ accessibilitySelectedTextRange. This covers all Emacs-initiated
|
||||
+ moves: editing commands, ELisp, isearch, etc.
|
||||
+ Exception: C-n/C-p (isCtrlNP) already uses next/previous with
|
||||
+ line granularity; VoiceOver handles them correctly. */
|
||||
+ if (emacsMovedCursor && !isCtrlNP
|
||||
+ && (granularity == ns_ax_text_selection_granularity_line
|
||||
+ || granularity == ns_ax_text_selection_granularity_unknown))
|
||||
+ line granularity; those are already sequential and VoiceOver
|
||||
+ handles them correctly. */
|
||||
+ if (emacsMovedCursor && !isCtrlNP)
|
||||
+ direction = ns_ax_text_selection_direction_discontiguous;
|
||||
+
|
||||
+ /* Post FocusedUIElementChanged on the containing NSView whenever
|
||||
+ Emacs moves the cursor independently of VoiceOver. Posting on
|
||||
+ the view causes VoiceOver to re-query accessibilityFocusedUIElement
|
||||
+ and re-anchor its browse cursor at the new selection range, without
|
||||
+ re-announcing the element name. Required for all granularities. */
|
||||
+ if (emacsMovedCursor && [self isAccessibilityFocused])
|
||||
+ ns_ax_post_notification (
|
||||
+ self.emacsView,
|
||||
+ NSAccessibilityFocusedUIElementChangedNotification);
|
||||
+
|
||||
/* Post notifications for focused and non-focused elements. */
|
||||
if ([self isAccessibilityFocused])
|
||||
[self postFocusedCursorNotification:point
|
||||
@@ -9532,7 +9739,7 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
granularity:granularity
|
||||
markActive:markActive
|
||||
oldMarkActive:oldMarkActive
|
||||
- emacsInitiated:NO];
|
||||
+ emacsInitiated:emacsMovedCursor];
|
||||
|
||||
if (![self isAccessibilityFocused] && cachedText)
|
||||
[self postCompletionAnnouncementForBuffer:b point:point];
|
||||
@@ -9668,6 +9875,17 @@ - (NSRect)accessibilityFrame
|
||||
@@ -9634,6 +9836,17 @@ - (NSRect)accessibilityFrame
|
||||
if (vis_start >= vis_end)
|
||||
return @[];
|
||||
|
||||
@@ -577,7 +573,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
/* Symbols are interned once at startup via DEFSYM in syms_of_nsterm;
|
||||
reference them directly here (GC-safe, no repeated obarray lookup). */
|
||||
|
||||
@@ -9788,6 +10006,7 @@ than O(chars). Fall back to pos+1 as safety net. */
|
||||
@@ -9754,6 +9967,7 @@ than O(chars). Fall back to pos+1 as safety net. */
|
||||
pos = span_end;
|
||||
}
|
||||
|
||||
@@ -585,7 +581,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
return [[spans copy] autorelease];
|
||||
}
|
||||
|
||||
@@ -9969,6 +10188,10 @@ - (void)dealloc
|
||||
@@ -9935,6 +10149,10 @@ - (void)dealloc
|
||||
#endif
|
||||
|
||||
[accessibilityElements release];
|
||||
@@ -596,7 +592,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
[[self menu] release];
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -11418,6 +11641,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
||||
@@ -11384,6 +11602,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f
|
||||
|
||||
windowClosing = NO;
|
||||
processingCompose = NO;
|
||||
@@ -606,7 +602,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
scrollbarsNeedingUpdate = 0;
|
||||
fs_state = FULLSCREEN_NONE;
|
||||
fs_before_fs = next_maximized = -1;
|
||||
@@ -12726,6 +12952,154 @@ - (id)accessibilityFocusedUIElement
|
||||
@@ -12692,6 +12913,154 @@ - (id)accessibilityFocusedUIElement
|
||||
The existing elements carry cached state (modiff, point) from the
|
||||
previous redisplay cycle. Rebuilding first would create fresh
|
||||
elements with current values, making change detection impossible. */
|
||||
@@ -761,7 +757,7 @@ index b3daec31f1..33b72a0825 100644
|
||||
- (void)postAccessibilityUpdates
|
||||
{
|
||||
NSTRACE ("[EmacsView postAccessibilityUpdates]");
|
||||
@@ -12736,11 +13110,64 @@ - (void)postAccessibilityUpdates
|
||||
@@ -12702,11 +13069,64 @@ - (void)postAccessibilityUpdates
|
||||
|
||||
/* Re-entrance guard: VoiceOver callbacks during notification posting
|
||||
can trigger redisplay, which calls ns_update_end, which calls us
|
||||
|
||||
Reference in New Issue
Block a user