swayfx
swayfx copied to clipboard
titlebar background not fully applied when setting marks
When setting marks in swayfx, the background is not fully apply in the titlebar. Here are 2 partial screenshots to better see the issue :
https://i.postimg.cc/Sx2yGBHk/screenshot-20250721-05-56-17.png https://i.postimg.cc/Dz1n9q2N/screenshot-20250721-05-56-11.png
one fix i found is to not update the clippping are in the mark block if there is a title text. Im not skill enough in the swayfx internals to know if this is the correct fix, but it works and i didnt saw any glitches in any container mode, tabbed, stacked, split, floating ...
here is the patch im using :
diff --git a/sway/tree/container.c b/sway/tree/container.c
index ec713400..435b6d98 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -354,10 +354,13 @@ void container_arrange_title_bar(struct sway_container *con) {
wlr_scene_node_set_position(node->node,
h_padding, (height - node->height) >> 1);
- text_box.x = node->node->x;
- text_box.y = node->node->y;
- text_box.width = alloc_width;
- text_box.height = node->height;
+
+ if (!con->title_bar.title_text) {
+ text_box.x = node->node->x;
+ text_box.y = node->node->y;
+ text_box.width = alloc_width;
+ text_box.height = node->height;
+ }
}
if (con->title_bar.title_text) {
sway version : swayfx version 0.5.3-514a51c1 (Jul 21 2025, branch 'master') (based on sway 1.11.00)
Interestingly this is only with one char marks
Looks like marks also have an implication wrt transparency of the title text: