aboutsummaryrefslogtreecommitdiff
path: root/csi.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-09-13 07:20:50 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-09-13 07:20:50 +0000
commit33f3818520bd5f7a063f64442c54d41625332aeb (patch)
tree33d21207b1f2473800358ec0a594942b965034db /csi.c
parentxsnprintf: various improvements related to xvsnprintf() and xsnprintf() (diff)
parentchangelog: remove escape sequences we've reverted (diff)
Merge branch 'toplevel-icon'
Diffstat (limited to 'csi.c')
-rw-r--r--csi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/csi.c b/csi.c
index 7c6ea7ca..35a39f82 100644
--- a/csi.c
+++ b/csi.c
@@ -1250,7 +1250,6 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 9: LOG_WARN("unimplemented: maximize/unmaximize window"); break;
case 10: LOG_WARN("unimplemented: to/from full screen"); break;
case 20: LOG_WARN("unimplemented: report icon label"); break;
- case 21: LOG_WARN("unimplemented: report window title"); break;
case 24: LOG_WARN("unimplemented: resize window (DECSLPP)"); break;
case 11: /* report if window is iconified */
@@ -1354,6 +1353,14 @@ csi_dispatch(struct terminal *term, uint8_t final)
break;
}
+ case 21: {
+ char reply[3 + strlen(term->window_title) + 2 + 1];
+ int chars = xsnprintf(
+ reply, sizeof(reply), "\033]l%s\033\\", term->window_title);
+ term_to_slave(term, reply, chars);
+ break;
+ }
+
case 22: { /* push window title */
/* 0 - icon + title, 1 - icon, 2 - title */
unsigned what = vt_param_get(term, 1, 0);