diff options
| -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); |
