Allow accessibility selectors needed for external window management tools

Tools like Easy Move+Resize use the macOS Accessibility API to find and
move/resize windows. They call AXUIElementCopyElementAtPosition to get the
content view, then use kAXWindowAttribute to navigate to the parent window.

The isAccessibilitySelectorAllowed: whitelist was blocking these selectors,
preventing external window management tools (Easy Move+Resize) from working with
kitty.

Fixes #5561
This commit is contained in:
Sasha Sandler 2026-02-28 22:22:33 -05:00
parent 38a2633f20
commit 2c89a7dedf

View file

@ -1884,6 +1884,17 @@ - (BOOL)isAccessibilitySelectorAllowed:(SEL)selector
selector == @selector(accessibilityInsertionPointLineNumber) ||
selector == @selector(accessibilityValue) ||
selector == @selector(setAccessibilityValue:)) return YES;
// Allow accessibility selectors needed for external window management tools
// (e.g. Easy Move+Resize) to find and manipulate the window.
// See https://github.com/kovidgoyal/kitty/issues/5561
if (selector == @selector(accessibilityWindow) ||
selector == @selector(accessibilityParent) ||
selector == @selector(accessibilityPosition) ||
selector == @selector(setAccessibilityPosition:) ||
selector == @selector(accessibilitySize) ||
selector == @selector(setAccessibilitySize:)) return YES;
return NO;
}