diff options
| -rw-r--r-- | dwm.1 | 6 | ||||
| -rw-r--r-- | event.c | 11 |
2 files changed, 15 insertions, 2 deletions
| @@ -47,6 +47,12 @@ and | |||
| 47 | .B floating | 47 | .B floating |
| 48 | mode. | 48 | mode. |
| 49 | .TP | 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 | .B Button3 | 56 | .B Button3 |
| 51 | click on a tag label adds/removes all windows with that | 57 | click on a tag label adds/removes all windows with that |
| 52 | .B tag | 58 | .B tag |
| @@ -109,10 +109,17 @@ buttonpress(XEvent *e) | |||
| 109 | for(a.i = 0; a.i < ntags; a.i++) { | 109 | for(a.i = 0; a.i < ntags; a.i++) { |
| 110 | x += textw(tags[a.i]); | 110 | x += textw(tags[a.i]); |
| 111 | if(ev->x < x) { | 111 | if(ev->x < x) { |
| 112 | if(ev->button == Button1) | 112 | switch(ev->button) { |
| 113 | case Button1: | ||
| 113 | view(&a); | 114 | view(&a); |
| 114 | else if(ev->button == Button3) | 115 | break; |
| 116 | case Button2: | ||
| 117 | toggletag(&a); | ||
| 118 | break; | ||
| 119 | case Button3: | ||
| 115 | toggleview(&a); | 120 | toggleview(&a); |
| 121 | break; | ||
| 122 | } | ||
| 116 | return; | 123 | return; |
| 117 | } | 124 | } |
| 118 | } | 125 | } |
