patches: restore postAccessibilityUpdates in ns_update_end (VoiceOver broken after rebase)

This commit is contained in:
2026-02-27 09:39:42 +01:00
parent d11aa168b9
commit 081d1c01e7

View File

@@ -1,13 +1,13 @@
From 241b432a8a1a5d562a18b5a2ac293dfbd7ccb466 Mon Sep 17 00:00:00 2001
From 4626c5d0688db9d878120b120cb19e12fa2f3a94 Mon Sep 17 00:00:00 2001
From: Martin Sukany <martin@sukany.cz>
Date: Fri, 27 Feb 2026 07:43:09 +0100
Date: Fri, 27 Feb 2026 09:39:39 +0100
Subject: [PATCH] ns: implement VoiceOver accessibility (AXBoundsForRange, line
nav, completions)
---
src/nsterm.h | 71 ++
src/nsterm.m | 2194 ++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 2123 insertions(+), 142 deletions(-)
src/nsterm.m | 2195 ++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 2126 insertions(+), 140 deletions(-)
diff --git a/src/nsterm.h b/src/nsterm.h
index 7c1ee4c..22828f2 100644
@@ -106,10 +106,22 @@ index 7c1ee4c..22828f2 100644
diff --git a/src/nsterm.m b/src/nsterm.m
index 932d209..fca5c15 100644
index 932d209..06ee636 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3232,6 +3232,37 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
@@ -1104,6 +1104,11 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
unblock_input ();
ns_updating_frame = NULL;
+
+#ifdef NS_IMPL_COCOA
+ /* Post accessibility notifications after each redisplay cycle. */
+ [view postAccessibilityUpdates];
+#endif
}
static void
@@ -3232,6 +3237,37 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
/* Prevent the cursor from being drawn outside the text area. */
r = NSIntersectionRect (r, ns_row_rect (w, glyph_row, TEXT_AREA));
@@ -147,7 +159,7 @@ index 932d209..fca5c15 100644
ns_focus (f, NULL, 0);
NSGraphicsContext *ctx = [NSGraphicsContext currentContext];
@@ -6849,219 +6880,1784 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
@@ -6849,216 +6885,1781 @@ - (BOOL)fulfillService: (NSString *)name withArg: (NSString *)arg
/* ==========================================================================
@@ -794,9 +806,7 @@ index 932d209..fca5c15 100644
-- (void)keyDown: (NSEvent *)theEvent
+- (void)dealloc
{
- Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (emacsframe);
- int code;
+{
+ [cachedText release];
+ [cachedCompletionAnnouncement release];
+ if (visibleRuns)
@@ -2068,13 +2078,10 @@ index 932d209..fca5c15 100644
+#define NS_KEYLOG 0
+
+- (void)keyDown: (NSEvent *)theEvent
+{
+ Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (emacsframe);
+ int code;
unsigned fnKeysym = 0;
static NSMutableArray *nsEvArray;
unsigned int flags = [theEvent modifierFlags];
@@ -8237,6 +9833,28 @@ - (void)windowDidBecomeKey /* for direct calls */
{
Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (emacsframe);
int code;
@@ -8237,6 +9838,28 @@ - (void)windowDidBecomeKey /* for direct calls */
XSETFRAME (event.frame_or_window, emacsframe);
kbd_buffer_store_event (&event);
ns_send_appdefined (-1); // Kick main loop
@@ -2103,7 +2110,7 @@ index 932d209..fca5c15 100644
}
@@ -9474,6 +11092,298 @@ - (int) fullscreenState
@@ -9474,6 +11097,298 @@ - (int) fullscreenState
return fs_state;
}