There exist frames which have buttons without title such as a simple
X application piped through xwayland which doesn't specify a title.
We draw the title bar with buttons, but hide it under the window
because geometry thinks a window needs titlebar only if it has title.
This patch change the condition, making it titlebar is needed if a
frame has title or has button(s), which makes more sense.
Signed-off-by: Boyan Ding <stu_dby@126.com>
struct theme *t = frame->theme;
int decoration_width, decoration_height, titlebar_height;
- if (frame->title)
+ if (frame->title || !wl_list_empty(&frame->buttons))
titlebar_height = t->titlebar_height;
else
titlebar_height = t->width;
if (!frame->geometry_dirty)
return;
- if (frame->title)
+ if (frame->title || !wl_list_empty(&frame->buttons))
titlebar_height = t->titlebar_height;
else
titlebar_height = t->width;