aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-10-22 16:01:53 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-10-22 16:01:53 +0000
commit2fbc336eb956ba0378c4a72dccede3d50d80c685 (patch)
tree9eb001e8e4cc4e0c10ee0660aeb9e50fbe48dade
parentMerge branch 'update-input-serial-on-each-keypress' (diff)
term: ignore window title updates if title is un-changed
-rw-r--r--CHANGELOG.md2
-rw-r--r--terminal.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d16ba08b..f40d8ba1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -63,6 +63,8 @@
(https://codeberg.org/dnkl/foot/issues/752).
* Clipboard occasionally ceasing to work, until window has been
re-focused (https://codeberg.org/dnkl/foot/issues/753).
+* Don’t propagate window title updates to the Wayland compositor
+ unless the new title is different from the old title.
### Security
diff --git a/terminal.c b/terminal.c
index 0f5b4b62..69f4755b 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3041,6 +3041,9 @@ term_set_window_title(struct terminal *term, const char *title)
if (term->conf->locked_title && term->window_title_has_been_set)
return;
+ if (term->window_title != NULL && strcmp(term->window_title, title) == 0)
+ return;
+
free(term->window_title);
term->window_title = xstrdup(title);
render_refresh_title(term);