Merge branch 'ignore-title-and-app-id-report-queries'

Related to #1894
This commit is contained in:
Daniel Eklöf 2025-01-07 13:12:54 +01:00
commit 25cd5dae26
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 15 additions and 3 deletions

View file

@ -60,6 +60,13 @@
## Unreleased
### Added
### Changed
* The `CSI 21 t` (report window title) and `OSC 176 ?` (report app-id)
escape sequences are now ignored ([#1894][1894]).
[1894]: https://codeberg.org/dnkl/foot/issues/1894
### Deprecated
### Removed
### Fixed

4
csi.c
View file

@ -1354,10 +1354,14 @@ csi_dispatch(struct terminal *term, uint8_t final)
}
case 21: {
#if 0 /* Disabled for now, see #1894 */
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);
#else
LOG_WARN("CSI 21 t (report window title) ignored");
#endif
break;
}

View file

@ -391,9 +391,6 @@ manipulation sequences. The generic format is:
| 20
: -
: Report icon label.
| 21
: -
: Report window title.
| 22
: -
: Push window title+icon.

4
osc.c
View file

@ -1498,6 +1498,7 @@ osc_dispatch(struct terminal *term)
case 176:
if (string[0] == '?' && string[1] == '\0') {
#if 0 /* Disabled for now, see #1894 */
const char *terminator = term->vt.osc.bel ? "\a" : "\033\\";
char *reply = xasprintf(
"\033]176;%s%s",
@ -1506,6 +1507,9 @@ osc_dispatch(struct terminal *term)
term_to_slave(term, reply, strlen(reply));
free(reply);
#else
LOG_WARN("OSC-176 app-id query ignored");
#endif
break;
}