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.
This commit is contained in:
tokyo4j 2026-03-12 00:48:10 +09:00 committed by Consolatis
parent 93029ca583
commit ab60379c7f

View file

@ -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;