From ab60379c7f3e46655f1c81dc76f25adae0b6c6f9 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Thu, 12 Mar 2026 00:48:10 +0900 Subject: [PATCH] ssd-titlebar: update title buffer when title gets empty Before this commit, ssd_update_title() returned early and the title was not updated when the title gets empty. Furthermore, this caused the title buffer to be misplaced outside of the titlebar when the window is resized. Reproducer: 1. Build and launch https://github.com/tokyo4j/wayland-demo/tree/repro-labwc-ssd-title-not-updated 2. One second later, the window title gets empty. But the title in SSD is not updated. 3. Un-minimize the window. Now the title buffer is misplaced outside of the titlebar. --- src/ssd/ssd-titlebar.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ssd/ssd-titlebar.c b/src/ssd/ssd-titlebar.c index 09f5362a..8e9fbc97 100644 --- a/src/ssd/ssd-titlebar.c +++ b/src/ssd/ssd-titlebar.c @@ -440,9 +440,8 @@ ssd_update_title(struct ssd *ssd) } struct view *view = ssd->view; - if (string_null_or_empty(view->title)) { - return; - } + /* view->title is never NULL (instead it can be an empty string) */ + assert(view->title); struct theme *theme = view->server->theme; struct ssd_state_title *state = &ssd->state.title;