From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Thu, 24 Feb 2022 00:37:19 +0000 (+0100) Subject: ssd/ssd_titlebar.c: Only store title state if title has been changed X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7d98bc7aa22a70d82eeb87e5465e9159e59d4a15;p=proto%2Flabwc.git ssd/ssd_titlebar.c: Only store title state if title has been changed --- diff --git a/src/ssd/ssd_titlebar.c b/src/ssd/ssd_titlebar.c index 968bd144..1c7d9876 100644 --- a/src/ssd/ssd_titlebar.c +++ b/src/ssd/ssd_titlebar.c @@ -255,10 +255,12 @@ ssd_update_title(struct view *view) dstate->truncated = rect->width <= dstate->width; } FOR_EACH_END - if (state->text) { - free(state->text); + if (!title_unchanged) { + if (state->text) { + free(state->text); + } + state->text = strdup(title); } - state->text = strdup(title); ssd_update_title_positions(view); }