termio: report color scheme synchronously

The reporting of color scheme was handled asynchronously by queuing a
handler in the surface. This could lead to race conditions where the
DSR is reported after subsequent VT sequences.

Fixes #5922
This commit is contained in:
Tobias Kohlbau
2025-11-25 22:19:57 +01:00
parent 250877eff6
commit 836d794b9e
6 changed files with 32 additions and 31 deletions

View File

@@ -311,6 +311,7 @@ fn drainMailbox(
log.debug("mailbox message={s}", .{@tagName(message)});
switch (message) {
.color_scheme_report => |v| try io.colorSchemeReport(data, v.force),
.crash => @panic("crash request, crashing intentionally"),
.change_config => |config| {
defer config.alloc.destroy(config.ptr);