summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwm.16
-rw-r--r--event.c11
2 files changed, 15 insertions, 2 deletions
diff --git a/dwm.1 b/dwm.1
index 4e23f1c..6a75b1d 100644
--- a/dwm.1
+++ b/dwm.1
@@ -47,6 +47,12 @@ and
47.B floating 47.B floating
48mode. 48mode.
49.TP 49.TP
50.B Button2
51click on a tag label adds/removes that
52.B tag
53to/from the focused
54.B window.
55.TP
50.B Button3 56.B Button3
51click on a tag label adds/removes all windows with that 57click on a tag label adds/removes all windows with that
52.B tag 58.B tag
diff --git a/event.c b/event.c
index bdf4071..e97abad 100644
--- a/event.c
+++ b/event.c
@@ -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 }