diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-01-03 07:00:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-01-03 07:00:53 +0000 |
| commit | b66a076bf1c0398521315c52ed77d3d7fa1a222f (patch) | |
| tree | 3af0b7902ff9b67a304e6f2e599df45dc06bead9 /terminal.c | |
| parent | meson: bump version to 1.20.0 (diff) | |
| parent | render: fix order we're checking custom codepoints (diff) | |
Merge branch 'master' into releases/1.20
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -3588,8 +3588,10 @@ term_set_app_id(struct terminal *term, const char *app_id) { if (app_id != NULL && *app_id == '\0') app_id = NULL; + if (term->app_id == NULL && app_id == NULL) return; + if (term->app_id != NULL && app_id != NULL && streq(term->app_id, app_id)) return; @@ -3604,6 +3606,19 @@ term_set_app_id(struct terminal *term, const char *app_id) } else { term->app_id = NULL; } + + const size_t length = strlen(app_id); + if (length > 2048) { + /* + * Not sure if there's a limit in the protocol, or the + * libwayland implementation, or e.g. wlroots, but too long + * app-id's (not e.g. title) causes at least river and sway to + * peg the CPU at 100%, and stop sending e.g. frame callbacks. + * + */ + term->app_id[2048] = '\0'; + } + render_refresh_app_id(term); render_refresh_icon(term); } |
