summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2022-01-10 17:16:09 +0100
committerbakkeby <[email protected]>2022-02-11 11:43:34 +0100
commit1920595795be273d36584e3fa884b9abcf85a92c (patch)
tree4b2198463a6e21f73adcabdb7f562b2750e2a4c9 /patch
parentaa1a7ff708572535c1e952e6318128b69142a893 (diff)
downloaddwm-flexipatch-1920595795be273d36584e3fa884b9abcf85a92c.tar.gz
dwm-flexipatch-1920595795be273d36584e3fa884b9abcf85a92c.zip
drawbar: Don't expend effort drawing bar if it is occluded
I noticed that a non-trivial amount of dwm's work on my machine was from drw_text, which seemed weird, because I have the bar disabled and we only use drw_text as part of bar drawing. Looking more closely, I realised that while we use m->showbar when updating the monitor bar margins, but don't skip actually drawing the bar if it is hidden. This patch skips drawing it entirely if that is the case. On my machine, this takes 10% of dwm's on-CPU time, primarily from restack() and focus(). When the bar is toggled on again, the X server will generate an Expose event, and we'll redraw the bar as normal as part of expose(). Ref. https://git.suckless.org/dwm/commit/8657affa2a61e85ca8df76b62e43cb02897d1d80.html
Diffstat (limited to 'patch')
0 files changed, 0 insertions, 0 deletions