From b2dc59a94b35c16e92d7f8e69cefbf72aa898b0a Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Thu, 24 Dec 2020 22:19:34 +0900 Subject: [PATCH] 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. --- dwm.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) 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) { -- 2.47.3