diff options
author | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-11 09:16:40 +0200 |
---|---|---|
committer | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-11 09:16:40 +0200 |
commit | 8278f0a6befccfb4eb156cb312c69e032158734a (patch) | |
tree | 6269f9b6b6f41bac8e963d836bc7dab2f4b2262f /event.c | |
parent | d3969634ac3b2e145402295e9833ce149f87fe45 (diff) | |
download | dwm-8278f0a6befccfb4eb156cb312c69e032158734a.tar.gz |
implemented focusprev on button1 press in the bar, and focusnext on button3 press in the bar
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -103,15 +103,19 @@ buttonpress(XEvent *e) if(barwin == ev->window) { switch(ev->button) { - default: + case Button1: x = 0; for(a.i = 0; a.i < ntags; a.i++) { x += textw(tags[a.i]); if(ev->x < x) { view(&a); - break; + return; } } + focusprev(NULL); + break; + case Button3: + focusnext(NULL); break; case Button4: viewprev(&a); |