Skip to content

titlebar background not fully applied when setting marks #449

@apewo

Description

@apewo

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions