diff options
author | Chris Down <chris@chrisdown.name> | 2021-12-18 16:58:23 +0000 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-12-19 16:16:30 +0100 |
commit | 8657affa2a61e85ca8df76b62e43cb02897d1d80 (patch) | |
tree | 278fac042ed0989747aea5a80b8f1f5e92db4efa /drw.o%2525252525253fid%2525252525253d1291a268265c847b4af56f10c86d237b45ec774b%25252525253fid%25252525253de2831fb035a903e9d094bbc9aa81ce93374cfba8%252525253fid%252525253de2831fb035a903e9d094bbc9aa81ce93374cfba8%2525253fid%2525253ddec2477b7fadd870d54cf6fd886d4f4a2e97f086%25253fid%25253ddec2477b7fadd870d54cf6fd886d4f4a2e97f086%253fid%253ddec2477b7fadd870d54cf6fd886d4f4a2e97f086%3fid%3d2c69ac172a3579da02dfec0933ef86e2600f9f61?id=8657affa2a61e85ca8df76b62e43cb02897d1d80 | |
parent | a786211d6cb794fba0ea406d86002c7618998afc (diff) |
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().
Diffstat (limited to 'drw.o%2525252525253fid%2525252525253d1291a268265c847b4af56f10c86d237b45ec774b%25252525253fid%25252525253de2831fb035a903e9d094bbc9aa81ce93374cfba8%252525253fid%252525253de2831fb035a903e9d094bbc9aa81ce93374cfba8%2525253fid%2525253ddec2477b7fadd870d54cf6fd886d4f4a2e97f086%25253fid%25253ddec2477b7fadd870d54cf6fd886d4f4a2e97f086%253fid%253ddec2477b7fadd870d54cf6fd886d4f4a2e97f086%3fid%3d2c69ac172a3579da02dfec0933ef86e2600f9f61?id=8657affa2a61e85ca8df76b62e43cb02897d1d80')
0 files changed, 0 insertions, 0 deletions