From: Matthias Kruk Date: Thu, 24 Dec 2020 13:19:34 +0000 (+0900) Subject: Draw the status bar on all screens X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=b2dc59a94b35c16e92d7f8e69cefbf72aa898b0a;p=dwm Draw the status bar on all screens The status bar contains the clock and other information that should be displayed on all screens. This commit makes sure it is drawn on all screens, not just the selected one. --- diff --git a/dwm.c b/dwm.c index cf29259..902b125 100755 --- a/dwm.c +++ b/dwm.c @@ -852,20 +852,18 @@ drawbar(Monitor *m) { drawtext(m->ltsymbol, dc.norm, False); dc.x += dc.w; x = dc.x; - if(m == selmon) { /* status is only drawn on selected monitor */ - dc.w = TEXTW(stext); - dc.x = m->ww - dc.w; - if(showsystray && m == selmon) { - dc.x -= getsystraywidth(); - } - if(dc.x < x) { - dc.x = x; - dc.w = m->ww - x; - } - drawtext(stext, dc.norm, False); + + dc.w = TEXTW(stext); + dc.x = m->ww - dc.w; + if(showsystray && m == selmon) { + dc.x -= getsystraywidth(); } - else - dc.x = m->ww; + if(dc.x < x) { + dc.x = x; + dc.w = m->ww - x; + } + drawtext(stext, dc.norm, False); + if((dc.w = dc.x - x) > bh) { dc.x = x; if(m->sel) {