Files
ghostty/macos
Mitchell Hashimoto 046b8fcc2a macos: defer OSC52 clipboard read confirmations until focused (#13744)
Fixes #10077

Clipboard read confirmations would immediately show a sheet which
grabbed focus. This could be used for a bunch of dumb reasons, including
DoS attacks. But, it also caused focus/sheet loops for programs that did
OSC52 on focus changes (which was seen via some Neovim configs!).

Now, if a surface is unfocused, we bell the surface and show the
confirmation request on next focus. If the surface is not focused or
another request comes in, we cancel the prior one.

This also fixes some memory management issues around clipboard requests
that were likely small leaks (didn't verify the old bug, but verified
the new code, and eyeballed the old).

To implement this, I decided to reorient the whole clipboard
confirmation thing around state on SurfaceView (which simplifies memory
management) and using Combine on BaseTerminalController to get notified.
2026-08-11 06:55:25 -07:00
..
2026-08-09 23:19:47 +02:00
2023-02-19 10:44:53 -08:00
2026-03-06 15:04:20 -08:00