patches: review pass 3 - move block_input to origin patches

block_input protection moved from P0008 to their respective origin
patches for independent compilability (GNU Emacs requirement):
- P0001 (ns_ax_buffer_text): now has block_input + record_unwind
- P0003 (postCompletionAnnouncementForBuffer): now has block_input
- P0004 (ns_ax_scan_interactive_spans): now has block_input

P0008 now only adds its own new functionality (child frame completion
announcements, echo area announcements) without duplicating block_input
from earlier patches.

All 9 patches apply cleanly with git am on Linux git 2.43.0.
This commit is contained in:
2026-03-02 18:55:33 +01:00
parent 6176087cfb
commit 6fd28e19a8
9 changed files with 97 additions and 105 deletions

View File

@@ -1,7 +1,7 @@
From d020bfbad36ff87ac4fd1ec6b52f7f451435260a Mon Sep 17 00:00:00 2001
From 2892f6c1591e8cf269897d738367daf38ae85326 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/9] ns: integrate accessibility with EmacsView and redisplay
Subject: [PATCH 5/8] ns: integrate accessibility with EmacsView and redisplay
Wire the accessibility element tree into EmacsView and hook it into
the redisplay cycle.
@@ -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 e8bbc1ffe1..231ae95a17 100644
index b460beb00c..95a5b378c1 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1275,7 +1275,7 @@ If a completion candidate is selected (overlay or child frame),
@@ -149,7 +149,7 @@ index e8bbc1ffe1..231ae95a17 100644
- (void)antialiasThresholdDidChange:(NSNotification *)notification
{
#ifdef NS_IMPL_COCOA
@@ -7626,7 +7677,6 @@ - (id)accessibilityTopLevelUIElement
@@ -7628,7 +7679,6 @@ - (id)accessibilityTopLevelUIElement
@@ -157,7 +157,7 @@ index e8bbc1ffe1..231ae95a17 100644
static BOOL
ns_ax_find_completion_overlay_range (struct buffer *b, ptrdiff_t point,
ptrdiff_t *out_start,
@@ -8739,7 +8789,6 @@ - (NSRect)accessibilityFrame
@@ -8741,7 +8791,6 @@ - (NSRect)accessibilityFrame
@end
@@ -165,7 +165,7 @@ index e8bbc1ffe1..231ae95a17 100644
/* ===================================================================
EmacsAccessibilityBuffer (Notifications) — AX event dispatch
@@ -9343,7 +9392,6 @@ - (NSRect)accessibilityFrame
@@ -9347,7 +9396,6 @@ - (NSRect)accessibilityFrame
@end
@@ -173,7 +173,7 @@ index e8bbc1ffe1..231ae95a17 100644
/* ===================================================================
EmacsAccessibilityInteractiveSpan --- helpers and implementation
=================================================================== */
@@ -9674,6 +9722,7 @@ - (void)dealloc
@@ -9682,6 +9730,7 @@ - (void)dealloc
[layer release];
#endif
@@ -181,7 +181,7 @@ index e8bbc1ffe1..231ae95a17 100644
[[self menu] release];
[super dealloc];
}
@@ -11022,6 +11071,32 @@ - (void)windowDidBecomeKey /* for direct calls */
@@ -11030,6 +11079,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 e8bbc1ffe1..231ae95a17 100644
}
@@ -12259,6 +12334,332 @@ - (int) fullscreenState
@@ -12267,6 +12342,332 @@ - (int) fullscreenState
return fs_state;
}
@@ -547,7 +547,7 @@ index e8bbc1ffe1..231ae95a17 100644
@end /* EmacsView */
@@ -14255,12 +14656,17 @@ Nil means use fullscreen the old (< 10.7) way. The old way works better with
@@ -14263,12 +14664,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,