mirror of
git://git.suckless.org/dwm
synced 2026-04-17 15:50:21 +02:00
The status bar in drawbar() calculates the text width as TEXTW(stext) - lrpad + 2. However, the click detection in buttonpress() used TEXTW(stext) without adjusting for that padding. This created an "extra" clickable area of some pixels to the left of the status text that would incorrectly trigger ClkStatusText actions instead of ClkWinTitle. Steps to reproduce: 1. Set a status text: xsetroot -name "HELLO" 2. Move the mouse to the empty space with some pixels close to the left of the word "HELLO" but in the title area. 3. Middle-click (or any binding for ClkStatusText). 4. You can see that the status bar action is triggered (default a terminal spawns), even though you clicked in the window title area. This fix ensures that the clickable area matches the visual text.
52 KiB
52 KiB