projects
/
suckless
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c368bc
)
implemented Button2 press on tags for toggletag on the focused client
author
Anselm R. Garbe
<arg@10kloc.org>
Thu, 31 Aug 2006 15:49:04 +0000
(17:49 +0200)
committer
Anselm R. Garbe
<arg@10kloc.org>
Thu, 31 Aug 2006 15:49:04 +0000
(17:49 +0200)
dwm.1
patch
|
blob
|
history
event.c
patch
|
blob
|
history
diff --git
a/dwm.1
b/dwm.1
index 4e23f1cb764960327aa58c504805d8f1a6eee038..6a75b1d301d45ff575e1327ba76f7acea8bee88f 100644
(file)
--- a/
dwm.1
+++ b/
dwm.1
@@
-47,6
+47,12
@@
and
.B floating
mode.
.TP
+.B Button2
+click on a tag label adds/removes that
+.B tag
+to/from the focused
+.B window.
+.TP
.B Button3
click on a tag label adds/removes all windows with that
.B tag
diff --git
a/event.c
b/event.c
index bdf4071299b4eaa30729c466119db739cdd09332..e97abadcb4ad61644d16db81a6aa0d30987a9351 100644
(file)
--- a/
event.c
+++ b/
event.c
@@
-109,10
+109,17
@@
buttonpress(XEvent *e)
for(a.i = 0; a.i < ntags; a.i++) {
x += textw(tags[a.i]);
if(ev->x < x) {
- if(ev->button == Button1)
+ switch(ev->button) {
+ case Button1:
view(&a);
- else if(ev->button == Button3)
+ break;
+ case Button2:
+ toggletag(&a);
+ break;
+ case Button3:
toggleview(&a);
+ break;
+ }
return;
}
}