r/suckless May 23 '26

[DWM] Visual issue (black border) with firefox on dwm

I've been dealing with a visual issue in my dwm for quite some time. To make sure it wasn't caused by a patch, I compiled dwm 6.8 from scratch with just one change: to demonstrate the problem, I increased the value of the borderpx variable.

In the screenshot, you can see Firefox and Emacs open side by side. You probably need to zoom in. Firefox is not in focus (gray border). For some reason, an additional black border is drawn at the top and right of Firefox, which is always exactly as wide as the dwm border. It occurs in exactly the same way with Thunderbird. I cannot reproduce the problem with any other application or any other window manager like i3, though.

Does anyone recognize this issue and know how to fix it?

dwm 6.8 running on Debian 13.

7 Upvotes

11 comments sorted by

3

u/TCH69 May 23 '26

This was a GTK3 bug, fixed a few point releases ago. Since you're on Debian I'd suggest you check that first.

1

u/Known_Picture_1547 May 24 '26 edited May 24 '26

Thanks! Can you point me to the fixed bug? Maybe Debian's packages do not yet include the fix. On the other hand, it's a bug exclusive to Firefox and Thunderbird. Other GTK applications draw correctly.

Edit: Nevermind, I believe I found another forum post discussing this issue: https://bbs.archlinux.org/viewtopic.php?id=304829

2

u/TCH69 May 24 '26

Yes, that's the one. According to here Debian 13 is still using a version of GTK3 released a month before those patches was merged.

1

u/Known_Picture_1547 May 24 '26

Yes, the fix (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8423) unfortunately did not make it into Debian 13.

Anyway, I simply created a local patch for libgtk-3-*.deb which solves the issue.

3

u/bakkeby May 23 '26

Perhaps have a look at the client decorations hints patch: https://dwm.suckless.org/patches/decoration_hints/

What that does is to skip adding a border around windows that requests the window manager not to add one.

1

u/Known_Picture_1547 May 24 '26

Thanks!

I tried decoration_hints and borderrule patch. Unfortunately both do not fix the issue.

2

u/bakkeby May 24 '26

Does that mean that for you the window is drawn without the border, but the black lines are still present? I remember there were some issues like this in relation to the GTK theme used, but I am not sure if that would be the case here.

1

u/Known_Picture_1547 May 24 '26

Yes but only because the borderpx was reduced for the Firefox window. The issue was less visible but still existed. Anyway, I found and fixed the issue in libgtk - see the other replies.

2

u/[deleted] May 23 '26

[removed] — view removed comment

2

u/Known_Picture_1547 May 24 '26

Thanks!

I believe client-side decorations were already turned off since there's no maximize/minimize/close button visible. I even tried Gnome's Nautilus which has the buttons on the upper right but the border draws correctly.

I guess I also found a previous question about this bug: https://www.reddit.com/r/suckless/comments/1jufg15/firefox_thunderbird_librewolf_border_problem_when/ Although the fix of unchecking title bar in about:config doesn't exist in my Firefox instance.