Subject: bug#79471: [PATCH] Add basic macOS acccessibility support for frames

From: Dani Brown <[email-masked]>
Date: Thu, 18 Sep 2025 19:47:04 +0100

Hi,
When trying to find Emacs frames with a macOS window-switching utility
(Raycast's window listing, if you're interested), I saw that they didn't
get listed. This appears to be the same reason that, before this patch,
no windows get returned by the following AppleScript:

  tell application "System Events" to get every window of (first process whose name is "Emacs")

After this patch, they do, along with their names as set by Emacs. And
they also get listed as expected by Raycast.

Incidentally this doesn't affect all utilities of this type. Contexts,
for instance, was always able to find Emacs frames. I guess it uses
a lower-level API. Still, this seems an improvement.

Thanks

In GNU Emacs 30.2 (build 1, aarch64-apple-darwin24.6.0, NS
appkit-2575.70 Version 15.6.1 (Build 24G90))
Windowing system distributor 'Apple', version 10.3.2575
System Description:  macOS 15.6.1

Configured using:
'configure
--prefix=/nix/store/yy4d1whcafa8za1y4jn0zix8gic1xvyh-emacs-pgtk-30.2
--disable-build-details --with-modules --disable-ns-self-contained
--with-ns --with-compress-install --with-toolkit-scroll-bars
--with-native-compilation --without-imagemagick --with-mailutils
--without-small-ja-dic --with-tree-sitter --without-xinput2
--without-xwidgets --without-dbus --without-selinux’