summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-08-25 15:06:38 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-08-25 15:06:38 +0200
commitd37dfa1bedbfadb5d39aa1937e77d4fd44319018 (patch)
treeac42e31987633fd32144310e21210cd0ed20a20d
parentsmall fix to separate client title from right-most tag (diff)
downloaddwm-d37dfa1bedbfadb5d39aa1937e77d4fd44319018.tar.gz
dwm-d37dfa1bedbfadb5d39aa1937e77d4fd44319018.zip
changed symbols for float/tiled mode, added mouse-driven mode toggle to buttonpress()
-rw-r--r--draw.c2
-rw-r--r--event.c22
2 files changed, 13 insertions, 11 deletions
diff --git a/draw.c b/draw.c
index 7da24f2..fb4ba2e 100644
--- a/draw.c
+++ b/draw.c
@@ -94,7 +94,7 @@ drawall()
94void 94void
95drawstatus() 95drawstatus()
96{ 96{
97 static const char *mode[] = { "~", "|" }; 97 static const char *mode[] = { "><", "|=" };
98 int i, x; 98 int i, x;
99 99
100 dc.x = dc.y = 0; 100 dc.x = dc.y = 0;
diff --git a/event.c b/event.c
index 86fb43b..35cd4f9 100644
--- a/event.c
+++ b/event.c
@@ -106,16 +106,18 @@ buttonpress(XEvent *e)
106 106
107 if(barwin == ev->window) { 107 if(barwin == ev->window) {
108 if(ev->x < modew) 108 if(ev->x < modew)
109 return; 109 togglemode(NULL);
110 x = modew; 110 else {
111 for(a.i = 0; a.i < ntags; a.i++) { 111 x = modew;
112 x += textw(tags[a.i]); 112 for(a.i = 0; a.i < ntags; a.i++) {
113 if(ev->x < x) { 113 x += textw(tags[a.i]);
114 if(ev->button == Button1) 114 if(ev->x < x) {
115 view(&a); 115 if(ev->button == Button1)
116 else if(ev->button == Button3) 116 view(&a);
117 toggleview(&a); 117 else if(ev->button == Button3)
118 return; 118 toggleview(&a);
119 return;
120 }
119 } 121 }
120 } 122 }
121 } 123 }