patches: fix standalone compilation + accessibility default + perf
Three fixes: 1. Patch 0000 now compiles standalone: replaced forward declaration of ns_ax_face_is_selected (defined in VoiceOver patches) with self-contained ns_zoom_face_is_selected in the Zoom patch. 2. ns_accessibility_enabled defaults to nil: eliminates ALL VoiceOver overhead (text cache rebuild, AX notifications, Mach IPC to AX server) when VoiceOver is not in use. Zero per-redisplay cost. Enable with (setq ns-accessibility-enabled t). 3. UAZoomEnabled() cached for 1s + ns_zoom_track_completion rate- limited to 2Hz: eliminates 150-600µs/frame of IPC overhead.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From a75ee6aff3734bd053865b3df734b75642f7305e Mon Sep 17 00:00:00 2001
|
||||
From 5edae69b987f3234d4545d8c77f89f5dc4201e03 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Sukany <martin@sukany.cz>
|
||||
Date: Sat, 28 Feb 2026 16:01:29 +0100
|
||||
Subject: [PATCH 09/11] ns: announce child frame completion candidates for
|
||||
@@ -109,10 +109,10 @@ index 2102fb9..dd98d56 100644
|
||||
@end
|
||||
|
||||
diff --git a/src/nsterm.m b/src/nsterm.m
|
||||
index 7c44e9c..12c451b 100644
|
||||
index aaeed33..d576512 100644
|
||||
--- a/src/nsterm.m
|
||||
+++ b/src/nsterm.m
|
||||
@@ -7298,6 +7298,112 @@ visual line index for Zoom (skip whitespace-only lines
|
||||
@@ -7318,6 +7318,112 @@ visual line index for Zoom (skip whitespace-only lines
|
||||
|
||||
return nil;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ index 7c44e9c..12c451b 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
|
||||
@@ -9035,6 +9141,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
@@ -9055,6 +9161,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
ptrdiff_t currentOverlayStart = 0;
|
||||
ptrdiff_t currentOverlayEnd = 0;
|
||||
|
||||
@@ -233,7 +233,7 @@ index 7c44e9c..12c451b 100644
|
||||
specpdl_ref count2 = SPECPDL_INDEX ();
|
||||
record_unwind_current_buffer ();
|
||||
if (b != current_buffer)
|
||||
@@ -9193,6 +9300,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
@@ -9213,6 +9320,7 @@ - (void)postCompletionAnnouncementForBuffer:(struct buffer *)b
|
||||
self.cachedCompletionOverlayEnd = 0;
|
||||
self.cachedCompletionPoint = 0;
|
||||
}
|
||||
@@ -241,7 +241,7 @@ index 7c44e9c..12c451b 100644
|
||||
}
|
||||
|
||||
/* ---- Notification dispatch (main entry point) ---- */
|
||||
@@ -9789,6 +9897,10 @@ - (void)dealloc
|
||||
@@ -9809,6 +9917,10 @@ - (void)dealloc
|
||||
#endif
|
||||
|
||||
[accessibilityElements release];
|
||||
@@ -252,7 +252,7 @@ index 7c44e9c..12c451b 100644
|
||||
[[self menu] release];
|
||||
[super dealloc];
|
||||
}
|
||||
@@ -12549,6 +12661,80 @@ - (id)accessibilityFocusedUIElement
|
||||
@@ -12569,6 +12681,80 @@ - (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. */
|
||||
@@ -333,7 +333,7 @@ index 7c44e9c..12c451b 100644
|
||||
- (void)postAccessibilityUpdates
|
||||
{
|
||||
NSTRACE ("[EmacsView postAccessibilityUpdates]");
|
||||
@@ -12559,11 +12745,59 @@ - (void)postAccessibilityUpdates
|
||||
@@ -12579,11 +12765,59 @@ - (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