diff options
Diffstat (limited to 'event.c')
| -rw-r--r-- | event.c | 22 |
1 files changed, 12 insertions, 10 deletions
| @@ -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 | } |
