about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-05-15 13:49:43 +0200
committerAnselm R. Garbe <arg@suckless.org>2007-05-15 13:49:43 +0200
commit5ad2828c579937afc3dc6da9987587e0eb2473dc (patch)
tree295753b3b54186155a43e924cde71fcba144256d
parentb896b58d6dbdfc98c0099bd7276e4989527160c6 (diff)
downloaddwm-5ad2828c579937afc3dc6da9987587e0eb2473dc.tar.gz
using BarTop as fallback if BARPOS is set to BarOff as default for toggling
-rw-r--r--layout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/layout.c b/layout.c
index 26e9de6..5bb6e97 100644
--- 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();
 }