patches: pre-upstream review fixes (all blockers + nits)
- 0000: fix double blank line before #ifdef, remove extra block scope braces - 0001: spell out 'AT' -> 'assistive technology'; fix stub comment - 0002: revert unrelated em-dash->triple-dash in windowWillResize strings - 0003-0005: renumber from [PATCH N/9] to [PATCH N/8] - 0006: remove 'Block-style cursors' from Known Limitations; fix @xref note - 0007: remove spurious ns_ax_face_is_selected ChangeLog entry - 0008: refactor goto skip_overlay_scan to nested if; remove spurious blank line - All: renumber series (0000=[PATCH 1/1], 0001-0008=[PATCH 1/8]-[PATCH 8/8])
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From a6b1def9a83e23cc0e3325d795ac22b46eb16a5d Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Wed, 4 Mar 2026 15:23:56 +0100
|
||||
Subject: [PATCH 9/9] ns: announce child frame completions to VoiceOver
|
||||
Subject: [PATCH 8/8] ns: announce child frame completions to VoiceOver
|
||||
|
||||
Child frame popups (Corfu, Company-mode child frames) render completion
|
||||
candidates in a separate frame whose buffer is not accessible via the
|
||||
@@ -438,7 +438,7 @@ index 209b8a0a1d..13696786ab 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9437,41 +9609,49 @@ frameworks like Vertico bump BOTH BUF_MODIFF (via text property
|
||||
@@ -9437,41 +9609,48 @@ 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.
|
||||
@@ -452,68 +452,40 @@ index 209b8a0a1d..13696786ab 100644
|
||||
+ echo produced by postTextChangedNotification, making typed
|
||||
+ characters inaudible. VoiceOver should read the overlay
|
||||
+ candidate only when the user navigates (C-n/C-p), not types. */
|
||||
+ if (!MINI_WINDOW_P (w) || didTextChange)
|
||||
+ goto skip_overlay_scan;
|
||||
+
|
||||
+ int selected_line = -1;
|
||||
+ NSString *candidate
|
||||
+ = ns_ax_selected_overlay_text (b, BUF_BEGV (b), BUF_ZV (b),
|
||||
+ &selected_line);
|
||||
+ if (candidate)
|
||||
+ if (MINI_WINDOW_P (w) && !didTextChange)
|
||||
{
|
||||
- int selected_line = -1;
|
||||
- NSString *candidate
|
||||
- = ns_ax_selected_overlay_text (b, BUF_BEGV (b), BUF_ZV (b),
|
||||
- &selected_line);
|
||||
- if (candidate)
|
||||
+ /* Deduplicate: only announce when the candidate changed. */
|
||||
+ if (![candidate isEqualToString:
|
||||
+ self.cachedCompletionAnnouncement])
|
||||
int selected_line = -1;
|
||||
NSString *candidate
|
||||
= ns_ax_selected_overlay_text (b, BUF_BEGV (b), BUF_ZV (b),
|
||||
&selected_line);
|
||||
if (candidate)
|
||||
{
|
||||
- /* Deduplicate: only announce when the candidate changed. */
|
||||
- if (![candidate isEqualToString:
|
||||
- self.cachedCompletionAnnouncement])
|
||||
- {
|
||||
- self.cachedCompletionAnnouncement = candidate;
|
||||
-
|
||||
- /* Announce the candidate text directly via NSApp.
|
||||
- Do NOT post SelectedTextChanged --- that would cause
|
||||
- VoiceOver to read the AX text at the cursor position
|
||||
- (the minibuffer input line), not the overlay candidate.
|
||||
- AnnouncementRequested with High priority interrupts
|
||||
- any current speech and announces our text. */
|
||||
- NSDictionary *annInfo = @{
|
||||
- NSAccessibilityAnnouncementKey: candidate,
|
||||
- NSAccessibilityPriorityKey:
|
||||
- @(NSAccessibilityPriorityHigh)
|
||||
- };
|
||||
- ns_ax_post_notification_with_info (
|
||||
- NSApp,
|
||||
- NSAccessibilityAnnouncementRequestedNotification,
|
||||
- annInfo);
|
||||
- }
|
||||
+ self.cachedCompletionAnnouncement = candidate;
|
||||
+
|
||||
+ /* Announce the candidate text directly via NSApp.
|
||||
+ Do NOT post SelectedTextChanged --- that would cause
|
||||
+ VoiceOver to read the AX text at the cursor position
|
||||
+ (the minibuffer input line), not the overlay candidate.
|
||||
+ AnnouncementRequested with High priority interrupts
|
||||
+ any current speech and announces our text. */
|
||||
+ NSDictionary *annInfo = @{
|
||||
+ NSAccessibilityAnnouncementKey: candidate,
|
||||
+ NSAccessibilityPriorityKey:
|
||||
+ @(NSAccessibilityPriorityHigh)
|
||||
+ };
|
||||
+ ns_ax_post_notification_with_info (
|
||||
+ NSApp,
|
||||
+ NSAccessibilityAnnouncementRequestedNotification,
|
||||
+ annInfo);
|
||||
/* Deduplicate: only announce when the candidate changed. */
|
||||
if (![candidate isEqualToString:
|
||||
self.cachedCompletionAnnouncement])
|
||||
{
|
||||
self.cachedCompletionAnnouncement = candidate;
|
||||
|
||||
/* Announce the candidate text directly via NSApp.
|
||||
Do NOT post SelectedTextChanged --- that would cause
|
||||
VoiceOver to read the AX text at the cursor position
|
||||
(the minibuffer input line), not the overlay candidate.
|
||||
AnnouncementRequested with High priority interrupts
|
||||
any current speech and announces our text. */
|
||||
NSDictionary *annInfo = @{
|
||||
NSAccessibilityAnnouncementKey: candidate,
|
||||
NSAccessibilityPriorityKey:
|
||||
@(NSAccessibilityPriorityHigh)
|
||||
};
|
||||
ns_ax_post_notification_with_info (
|
||||
NSApp,
|
||||
NSAccessibilityAnnouncementRequestedNotification,
|
||||
annInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+ skip_overlay_scan:
|
||||
/* --- Cursor moved or selection changed ---
|
||||
Independent check from the overlay branch above. */
|
||||
if (point != self.cachedPoint || markActive != self.cachedMarkActive)
|
||||
@@ -652,7 +624,7 @@ index 209b8a0a1d..13696786ab 100644
|
||||
scrollbarsNeedingUpdate = 0;
|
||||
fs_state = FULLSCREEN_NONE;
|
||||
fs_before_fs = next_maximized = -1;
|
||||
@@ -12789,6 +12991,156 @@ - (id)accessibilityFocusedUIElement
|
||||
@@ -12789,6 +12991,155 @@ - (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. */
|
||||
@@ -720,7 +692,6 @@ index 209b8a0a1d..13696786ab 100644
|
||||
+ in the minibuffer. */
|
||||
+- (void)announceChildFrameCompletion
|
||||
+{
|
||||
+
|
||||
+ /* Validate frame state --- child frames may be partially
|
||||
+ initialized during creation. */
|
||||
+ if (!WINDOWP (emacsframe->selected_window))
|
||||
|
||||
Reference in New Issue
Block a user