Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
dwm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented Button2 press on tags for toggletag on the focused client
[dwm.git]
/
event.c
diff --git
a/event.c
b/event.c
index
bdf4071
..
e97abad
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) {
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);
view(&a);
- else if(ev->button == Button3)
+ break;
+ case Button2:
+ toggletag(&a);
+ break;
+ case Button3:
toggleview(&a);
toggleview(&a);
+ break;
+ }
return;
}
}
return;
}
}