implemented Button2 press on tags for toggletag on the focused client
05fbbbd8
2 file(s) · +15 −2
| 47 | 47 | .B floating |
|
| 48 | 48 | mode. |
|
| 49 | 49 | .TP |
|
| 50 | + | .B Button2 |
|
| 51 | + | click on a tag label adds/removes that |
|
| 52 | + | .B tag |
|
| 53 | + | to/from the focused |
|
| 54 | + | .B window. |
|
| 55 | + | .TP |
|
| 50 | 56 | .B Button3 |
|
| 51 | 57 | click on a tag label adds/removes all windows with that |
|
| 52 | 58 | .B tag |
| 109 | 109 | for(a.i = 0; a.i < ntags; a.i++) { |
|
| 110 | 110 | x += textw(tags[a.i]); |
|
| 111 | 111 | if(ev->x < x) { |
|
| 112 | - | if(ev->button == Button1) |
|
| 112 | + | switch(ev->button) { |
|
| 113 | + | case Button1: |
|
| 113 | 114 | view(&a); |
|
| 114 | - | else if(ev->button == Button3) |
|
| 115 | + | break; |
|
| 116 | + | case Button2: |
|
| 117 | + | toggletag(&a); |
|
| 118 | + | break; |
|
| 119 | + | case Button3: |
|
| 115 | 120 | toggleview(&a); |
|
| 121 | + | break; |
|
| 122 | + | } |
|
| 116 | 123 | return; |
|
| 117 | 124 | } |
|
| 118 | 125 | } |