mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-03 06:09:04 +00:00
terminal: add visibility reports
Applications cannot infer whether an unfocused terminal remains visible, so focus reports are insufficient for avoiding expensive rendering while a view is hidden. Implement private mode 2033 and the visibility query/report sequences. Track conservative per-surface visibility, report every effective change while enabled, and always answer explicit queries and mode enables. Keep view visibility across terminal resets because it is owned by the host, not terminal state. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019fa965-aa5f-7099-85b4-a9679d2c8bd3
This commit is contained in:
@@ -313,6 +313,11 @@ fn drainMailbox(
|
||||
log.debug("mailbox message={s}", .{@tagName(message)});
|
||||
switch (message) {
|
||||
.color_scheme_report => |v| try io.colorSchemeReport(data, v.force),
|
||||
.visibility_report => |v| try io.visibilityReport(
|
||||
data,
|
||||
v.visible,
|
||||
v.force,
|
||||
),
|
||||
.crash => @panic("crash request, crashing intentionally"),
|
||||
.change_config => |config| {
|
||||
defer config.alloc.destroy(config.ptr);
|
||||
|
||||
Reference in New Issue
Block a user