mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-05 23:28:41 +00:00
#11799 Creating a CGEventTap without Accessibility permission leaks a Mach port inside CoreGraphics on every failed attempt. The global keybind listener retried this once per second while waiting for permission, so Ghostty eventually exhausted the process port limit. Request Accessibility access once, poll AXIsProcessTrusted while access is denied, and create the event tap only after access is granted. Stop polling before creation so an unrelated tap failure cannot restart the leaking retry loop.