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 | simplified unmanage (diff) | |
| download | dwm-8278f0a6befccfb4eb156cb312c69e032158734a.tar.gz dwm-8278f0a6befccfb4eb156cb312c69e032158734a.zip | |
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) | |||
| 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); |
