Gregory Anders df06697899 termio: send initial focus reports
When the focus reporting mode (1004) is enabled, send the current focus
state. This allows applications to track their own focus state without
first having to wait for a focus event (or query
it by sending a DECSET followed by a DECRST).

Ghostty's focus state is stored only in the renderer, where the termio
thread cannot access it. We duplicate the focus state tracking in the
Terminal struct with the addition of a new (1-bit) flag. We duplicate
the state because the renderer uses the focus state for its own purposes
(in particular, the Metal renderer uses the focus state to manage
its DisplayLink), and synchronizing access to the shared terminal state
is more cumbersome than simply tracking the focus state in the renderer
in addition to the terminal.
2024-09-04 22:13:52 -05:00
..
2024-07-15 10:50:17 -07:00
2024-07-15 10:23:09 -07:00
2024-09-04 22:13:52 -05:00
2024-07-15 10:23:09 -07:00
2024-08-05 13:56:57 +02:00
2024-09-04 22:13:52 -05:00
2024-09-04 22:13:52 -05:00