# HG changeset patch # User Anselm R. Garbe # Date 1157039344 -7200 # Node ID 1da9a6b94ca992a681ba95c1511d7a75357d04c8 # Parent 6786cd59468f9a4fd33e926c40cb5ed597e9096e implemented Button2 press on tags for toggletag on the focused client diff -r 6786cd59468f -r 1da9a6b94ca9 dwm.1 --- a/dwm.1 Thu Aug 31 08:48:04 2006 +0200 +++ b/dwm.1 Thu Aug 31 17:49:04 2006 +0200 @@ -47,6 +47,12 @@ .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 -r 6786cd59468f -r 1da9a6b94ca9 event.c --- a/event.c Thu Aug 31 08:48:04 2006 +0200 +++ b/event.c Thu Aug 31 17:49:04 2006 +0200 @@ -109,10 +109,17 @@ 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; } }