From 73cd8eb0bbd99ac6b8f5f11a70dbefddb7f53a27 Mon Sep 17 00:00:00 2001 From: Jack Zeal Date: Sat, 4 Apr 2026 00:00:20 -0700 Subject: [PATCH] Force a redraw so we know we'll get a refreshed border after reconfig --- src/common/borderset.c | 1 - src/ssd/ssd-titlebar.c | 10 +++++++++- src/ssd/ssd.c | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/borderset.c b/src/common/borderset.c index 3ceccb1d..63db7929 100644 --- a/src/common/borderset.c +++ b/src/common/borderset.c @@ -5,7 +5,6 @@ #include "common/macros.h" #include "buffer.h" - struct borderset * getBorders(uint32_t id, int size, enum border_type type, int bevelSize) { struct borderset * current = borderCache; struct borderset * last; diff --git a/src/ssd/ssd-titlebar.c b/src/ssd/ssd-titlebar.c index c76df8e0..31ea7191 100644 --- a/src/ssd/ssd-titlebar.c +++ b/src/ssd/ssd-titlebar.c @@ -37,6 +37,7 @@ ssd_titlebar_create(struct ssd *ssd) LAB_NODE_TITLEBAR, view, /*data*/ NULL); enum ssd_active_state active; + bool shouldForceUpdate = FALSE; FOR_EACH_ACTIVE_STATE(active) { struct ssd_titlebar_subtree *subtree = &ssd->titlebar.subtrees[active]; subtree->tree = lab_wlr_scene_tree_create(ssd->titlebar.tree); @@ -53,7 +54,6 @@ ssd_titlebar_create(struct ssd *ssd) /* Background */ subtree->bar = lab_wlr_scene_buffer_create(parent, titlebar_fill); - if (theme->window[active].title_bg.border_type) { /* Beveled Titlebar */ float *color = theme->window[active].title_bg.color; @@ -65,6 +65,10 @@ ssd_titlebar_create(struct ssd *ssd) uint32_t colour32 = (uint32_t)(a*255) << 24 | (uint32_t)(r*255) << 16 | (uint32_t)(g*255) << 8 | (uint32_t)(b*255); struct borderset * renderedborders = getBorders(colour32, theme->window[active].title_bg.border_width, theme->window[active].title_bg.border_type, theme->window[active].title_bg.bevel_width); subtree->texturedBorders = generateBufferset(subtree->tree, renderedborders, theme->window[active].title_bg.border_width); + + // If we have the beveled borders, we actually have to run ssd_titlebar_update() to make sure we render the updated + // borders. Otherwise they disappear on reconfigure + shouldForceUpdate = true; } /* * Work around the wlroots/pixman bug that widened 1px buffer @@ -152,6 +156,10 @@ ssd_titlebar_create(struct ssd *ssd) if (view->visible_on_all_workspaces) { set_alt_button_icon(ssd, LAB_NODE_BUTTON_OMNIPRESENT, true); } + + if (shouldForceUpdate) { + ssd_titlebar_update(ssd); + } } static void diff --git a/src/ssd/ssd.c b/src/ssd/ssd.c index e2ab6375..9f62d689 100644 --- a/src/ssd/ssd.c +++ b/src/ssd/ssd.c @@ -176,6 +176,7 @@ ssd_create(struct view *view, bool active) ssd_enable_keybind_inhibit_indicator(ssd, view->inhibits_keybinds); ssd->state.geometry = view->current; + ssd_titlebar_update(ssd); return ssd; }