using BarTop as fallback if BARPOS is set to BarOff as default for toggling - dwm - dynamic window manager
 (HTM) git clone https://git.parazyd.org/dwm
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 5ad2828c579937afc3dc6da9987587e0eb2473dc
 (DIR) parent b896b58d6dbdfc98c0099bd7276e4989527160c6
 (HTM) Author: Anselm R. Garbe <arg@suckless.org>
       Date:   Tue, 15 May 2007 13:49:43 +0200
       
       using BarTop as fallback if BARPOS is set to BarOff as default for toggling
       Diffstat:
         M layout.c                            |       7 ++++++-
       
       1 file changed, 6 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/layout.c b/layout.c
       @@ -218,7 +218,12 @@ setlayout(const char *arg) {
        
        void
        togglebar(const char *arg) {
       -        bpos = (bpos == BarOff) ? BARPOS : BarOff;
       +        if(bpos == BarOff) {
       +                if((bpos = BARPOS) == BarOff)
       +                        bpos = BarTop;
       +        }
       +        else
       +                bpos = BarOff;
                updatebarpos();
                lt->arrange();
        }