From 8db88cceb758b5be23e7db1fe74a48102ab07dc0 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Tue, 28 Jul 2026 14:16:05 -0500 Subject: 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 --- doc/foot-ctlseqs.7.scd | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/foot-ctlseqs.7.scd b/doc/foot-ctlseqs.7.scd index 40906ebf..192628cd 100644 --- a/doc/foot-ctlseqs.7.scd +++ b/doc/foot-ctlseqs.7.scd @@ -340,6 +340,12 @@ that corresponds to one of the following modes: | 2031 : contour : Request color theme updates +| 2033 +: rockorager +: Request terminal visibility reports. Enabling this mode immediately reports + the current visibility as *CSI ? 999 ; 1|2 n*, where *1* means potentially + visible and *2* means not visible. Further reports are sent whenever the + visibility changes. | 2048 : TODO : In-band window resize notifications @@ -667,6 +673,12 @@ manipulation sequences. The generic format is: 997 ; 1|2 n*, where *1* means dark and *2* light. By convention, the primary theme in foot is considered dark, and the alternative theme light. +| \\E[ ? 998 n +: Query terminal visibility +: rockorager +: The current terminal visibility is reported as *CSI ? 999 ; 1|2 n*, where + *1* means potentially visible and *2* means not visible. This does not enable + private mode 2033. # OSC -- cgit v1.3