diff options
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 'dwm%2525252525252525252525252525252525252525253fid%2525252525252525252525252525252525252525253dc313f5d260fdf8acf7809373a76ddd0e9d19d3d9%25252525252525252525252525252525252525253fid%25252525252525252525252525252525252525253dc313f5d260fdf8acf7809373a76ddd0e9d19d3d9%252525252525252525252525252525252525253fid%252525252525252525252525252525252525253dc313f5d260fdf8acf7809373a76ddd0e9d19d3d9&id2%252525252525252525252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674%2525252525252525252525252525252525253fid%2525252525252525252525252525252525253dc313f5d260fdf8acf7809373a76ddd0e9d19d3d9&id2%2525252525252525252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674%25252525252525252525252525252525253fid%25252525252525252525252525252525253dc313f5d260fdf8acf7809373a76ddd0e9d19d3d9%252525252525252525252525252525253fid%252525252525252525252525252525253dc313f5d260fdf8acf7809373a76ddd0e9d19d3d9%2525252525252525252525252525253fid%2525252525252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674%25252525252525252525252525253fid%25252525252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674%252525252525252525252525253fid%252525252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674%2525252525252525252525253fid%2525252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674%25252525252525252525253fid%25252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674&id2%25252525252525252525253dd39e2f3441fe18aba8d1a62c08918a411ec6f237%252525252525252525253fid%252525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674&id2%252525252525252525253dd39e2f3441fe18aba8d1a62c08918a411ec6f237%2525252525252525253fid%2525252525252525253d169deabcd998c2bd3f58e69fd24bd6e3e5de8674%25252525252525253fid%25252525252525253dd39e2f3441fe18aba8d1a62c08918a411ec6f237%252525252525253fid%252525252525253d8657affa2a61e85ca8df76b62e43cb02897d1d80%2525252525253fid%2525252525253d8657affa2a61e85ca8df76b62e43cb02897d1d80%25252525253fid%25252525253d8657affa2a61e85ca8df76b62e43cb02897d1d80&id2%25252525253da786211d6cb794fba0ea406d86002c7618998afc%252525253fid%252525253d8657affa2a61e85ca8df76b62e43cb02897d1d80&id2%252525253da786211d6cb794fba0ea406d86002c7618998afc%2525253fid%2525253d8657affa2a61e85ca8df76b62e43cb02897d1d80&id2%2525253da786211d6cb794fba0ea406d86002c7618998afc%25253fid%25253d8657affa2a61e85ca8df76b62e43cb02897d1d80%253fid%253d8657affa2a61e85ca8df76b62e43cb02897d1d80%3fid%3d8657affa2a61e85ca8df76b62e43cb02897d1d80?id=8657affa2a61e85ca8df76b62e43cb02897d1d80')
0 files changed, 0 insertions, 0 deletions