using BarTop as fallback if BARPOS is set to BarOff as default for toggling
authorAnselm R. Garbe <arg@suckless.org>
Tue, 15 May 2007 13:49:43 +0200
changeset 883 2cbf1010be11
parent 882 9c7fba655d72
child 884 e08deeb1fb07
using BarTop as fallback if BARPOS is set to BarOff as default for toggling
layout.c
--- a/layout.c	Tue May 15 13:44:04 2007 +0200
+++ b/layout.c	Tue May 15 13:49:43 2007 +0200
@@ -218,7 +218,12 @@
 
 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();
 }