summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R.Garbe <arg@10ksloc.org>2006-08-11 09:16:40 +0200
committerAnselm R.Garbe <arg@10ksloc.org>2006-08-11 09:16:40 +0200
commit8278f0a6befccfb4eb156cb312c69e032158734a (patch)
tree6269f9b6b6f41bac8e963d836bc7dab2f4b2262f
parentsimplified unmanage (diff)
downloaddwm-8278f0a6befccfb4eb156cb312c69e032158734a.tar.gz
dwm-8278f0a6befccfb4eb156cb312c69e032158734a.zip
implemented focusprev on button1 press in the bar, and focusnext on button3 press in the bar
-rw-r--r--event.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/event.c b/event.c
index 650967e..53a110a 100644
--- a/event.c
+++ b/event.c
@@ -103,15 +103,19 @@ buttonpress(XEvent *e)
103 103
104 if(barwin == ev->window) { 104 if(barwin == ev->window) {
105 switch(ev->button) { 105 switch(ev->button) {
106 default: 106 case Button1:
107 x = 0; 107 x = 0;
108 for(a.i = 0; a.i < ntags; a.i++) { 108 for(a.i = 0; a.i < ntags; a.i++) {
109 x += textw(tags[a.i]); 109 x += textw(tags[a.i]);
110 if(ev->x < x) { 110 if(ev->x < x) {
111 view(&a); 111 view(&a);
112 break; 112 return;
113 } 113 }
114 } 114 }
115 focusprev(NULL);
116 break;
117 case Button3:
118 focusnext(NULL);
115 break; 119 break;
116 case Button4: 120 case Button4:
117 viewprev(&a); 121 viewprev(&a);