Mercurial > dwm-meillo
comparison event.c @ 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 | dca6aca09653 |
children | 9c703e528e58 |
comparison
equal
deleted
inserted
replaced
393:6786cd59468f | 394:1da9a6b94ca9 |
---|---|
107 if(barwin == ev->window) { | 107 if(barwin == ev->window) { |
108 x = 0; | 108 x = 0; |
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 } |
119 if(ev->x < x + bmw) { | 126 if(ev->x < x + bmw) { |
120 if(ev->button == Button1) | 127 if(ev->button == Button1) |