; New function 'ns-process-is-accessibility-trusted', no message (bug#80624)
* src/nsfns.m (Fns_process_is_accessibility_trusted): New function. (syms_of_nsfns): New defsubr. * src/nsterm.m: ([EmacsApp applicationDidFinishLaunching:]): Remove the AXIsProcessTrusted message. * etc/NEWS: Updated.
This commit is contained in:
committed by
Alan Third
parent
fc128826b5
commit
b4da8610cd
14
etc/NEWS
14
etc/NEWS
@@ -4520,9 +4520,17 @@ singleton list.
|
||||
---
|
||||
** Support macOS Accessibility Zoom focus tracking.
|
||||
This is an important change for visually-impaired users. If macOS
|
||||
Accessibility Zoom is enabled (System Settings, Accessibility, Zoom)
|
||||
with keyboard focus tracking (Advanced...), Zoom is informed of updated
|
||||
cursor positions during each redisplay cycle.
|
||||
Accessibility Zoom is enabled via (System Settings, Accessibility,
|
||||
Zoom...) with keyboard focus tracking (Advanced...), Zoom is informed
|
||||
of updated cursor positions during each redisplay cycle.
|
||||
|
||||
---
|
||||
** New macOS function 'ns-process-is-accessibility-trusted'.
|
||||
This function returns t if the macOS Accessibility Framework trusts the
|
||||
Emacs. This is a necessary condition for Accessibility Zoom and other
|
||||
accessibility features. Enable Emacs via (System Settings, Privacy &
|
||||
Security, Accessibility...) and add the Emacs.app installed directory to
|
||||
the enabled application list.
|
||||
|
||||
---
|
||||
** Process execution has been optimized on Android.
|
||||
|
||||
22
src/nsfns.m
22
src/nsfns.m
@@ -3755,6 +3755,27 @@ DEFUN ("ns-show-character-palette",
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
DEFUN ("ns-process-is-accessibility-trusted",
|
||||
Fns_process_is_accessibility_trusted,
|
||||
Sns_process_is_accessibility_trusted,
|
||||
0, 0, 0,
|
||||
doc: /* Return non-nil if Emacs is trusted by macOS Accessibility.
|
||||
Return nil otherwise or if the OS is not macOS.
|
||||
This is necessary for Emacs to support Zoom and related accessibility
|
||||
features. Authorize Emacs for accessibility via System
|
||||
Settings... Privacy & Security... Accessibility... and add the Emacs.app
|
||||
installed directory to the enabled application list. */)
|
||||
(void)
|
||||
{
|
||||
#ifdef NS_IMPL_COCOA
|
||||
if (AXIsProcessTrusted())
|
||||
return Qt;
|
||||
#endif
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
||||
DEFUN ("ns-badge", Fns_badge, Sns_badge, 1, 1, 0,
|
||||
doc: /* Set the app icon badge to BADGE.
|
||||
BADGE should be a string short enough to display nicely in the short
|
||||
@@ -4248,6 +4269,7 @@ The default value is t. */);
|
||||
defsubr (&Sns_set_mouse_absolute_pixel_position);
|
||||
defsubr (&Sns_mouse_absolute_pixel_position);
|
||||
defsubr (&Sns_show_character_palette);
|
||||
defsubr (&Sns_process_is_accessibility_trusted);
|
||||
defsubr (&Sns_badge);
|
||||
defsubr (&Sns_request_user_attention);
|
||||
defsubr (&Sns_progress_indicator);
|
||||
|
||||
@@ -6517,14 +6517,6 @@ ns_term_shutdown (int sig)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NS_IMPL_COCOA
|
||||
/* Is accessibility enabled for this process/bundle? */
|
||||
if (AXIsProcessTrusted())
|
||||
NSLog (@"Emacs is macOS AXIsProcessTrusted");
|
||||
else
|
||||
NSLog (@"Emacs is not macOS AXIsProcessTrusted");
|
||||
#endif
|
||||
|
||||
ns_send_appdefined (-2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user