From 32bfada2fbbd0f6db140557addab977e4447c598 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 18 Jul 2023 13:04:54 +0200 Subject: Fix losing title of windows with a 3 or 4 bytes first character Fixes #757. --- src/core/window-props.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/window-props.c b/src/core/window-props.c index fd48e732..e1275817 100644 --- a/src/core/window-props.c +++ b/src/core/window-props.c @@ -489,7 +489,7 @@ set_title_text (MetaWindow *window, g_free (*target); - if (!title || g_utf8_strlen (title, 2) < 1) + if (!title || !*title) *target = g_strdup (""); else if (g_utf8_strlen (title, MAX_TITLE_LENGTH + 1) > MAX_TITLE_LENGTH) { -- cgit v1.2.1