aewl
changeset 394:1da9a6b94ca9
implemented Button2 press on tags for toggletag on the focused client
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Thu, 31 Aug 2006 17:49:04 +0200 |
parents | 6786cd59468f |
children | 7528080beb0e |
files | dwm.1 event.c |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/dwm.1 Thu Aug 31 08:48:04 2006 +0200 1.2 +++ b/dwm.1 Thu Aug 31 17:49:04 2006 +0200 1.3 @@ -47,6 +47,12 @@ 1.4 .B floating 1.5 mode. 1.6 .TP 1.7 +.B Button2 1.8 +click on a tag label adds/removes that 1.9 +.B tag 1.10 +to/from the focused 1.11 +.B window. 1.12 +.TP 1.13 .B Button3 1.14 click on a tag label adds/removes all windows with that 1.15 .B tag
2.1 --- a/event.c Thu Aug 31 08:48:04 2006 +0200 2.2 +++ b/event.c Thu Aug 31 17:49:04 2006 +0200 2.3 @@ -109,10 +109,17 @@ 2.4 for(a.i = 0; a.i < ntags; a.i++) { 2.5 x += textw(tags[a.i]); 2.6 if(ev->x < x) { 2.7 - if(ev->button == Button1) 2.8 + switch(ev->button) { 2.9 + case Button1: 2.10 view(&a); 2.11 - else if(ev->button == Button3) 2.12 + break; 2.13 + case Button2: 2.14 + toggletag(&a); 2.15 + break; 2.16 + case Button3: 2.17 toggleview(&a); 2.18 + break; 2.19 + } 2.20 return; 2.21 } 2.22 }