diff options
| author | Tim Culverhouse <tim@timculverhouse.com> | 2026-07-28 19:16:05 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2026-07-30 12:18:58 +0000 |
| commit | 8db88cceb758b5be23e7db1fe74a48102ab07dc0 (patch) | |
| tree | 2741b009de1520e2203d4b6695073422c77df738 /terminal.h | |
| parent | changelog: add missing bug reference (diff) | |
terminal: add visibility reports
Applications cannot infer whether their terminal view is observable from
keyboard focus alone, so they may continue expensive rendering while the
surface is hidden.
Implement private mode 2033 and the one-shot visibility query. Report
Wayland xdg_toplevel suspension as not visible and otherwise remain
conservative by treating the terminal as potentially visible.
Amp-Thread-ID: https://ampcode.com/threads/T-019fb2b7-f245-7124-a69a-1484812532bb
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -439,6 +439,7 @@ struct terminal { bool reverse_wrap; bool bracketed_paste; bool focus_events; + bool visibility_reports; bool alt_scrolling; bool modify_other_keys_2; /* True when modifyOtherKeys=2 (i.e. "CSI >4;2m") */ enum cursor_origin origin; @@ -523,6 +524,7 @@ struct terminal { bool cursor_blink:1; bool bracketed_paste:1; bool focus_events:1; + bool visibility_reports:1; bool alt_scrolling:1; //bool mouse_x10:1; bool mouse_click:1; @@ -927,6 +929,7 @@ void term_restore_cursor(struct terminal *term, const struct cursor *cursor); void term_visual_focus_in(struct terminal *term); void term_visual_focus_out(struct terminal *term); +void term_send_visibility_report(struct terminal *term); void term_kbd_focus_in(struct terminal *term); void term_kbd_focus_out(struct terminal *term); void term_mouse_down( |
