dwm-meillo
diff bar.c @ 58:1269bd127551
made barclick to select the specific tag
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Fri, 14 Jul 2006 10:34:07 +0200 |
parents | f005d46462e8 |
children | 50450aa24a46 |
line diff
1.1 --- a/bar.c Fri Jul 14 10:07:38 2006 +0200 1.2 +++ b/bar.c Fri Jul 14 10:34:07 2006 +0200 1.3 @@ -6,6 +6,20 @@ 1.4 #include "dwm.h" 1.5 1.6 void 1.7 +barclick(XButtonPressedEvent *e) 1.8 +{ 1.9 + int x = 0; 1.10 + Arg a; 1.11 + for(a.i = 0; a.i < TLast; a.i++) { 1.12 + x += textw(tags[a.i]) + dc.font.height; 1.13 + if(e->x < x) { 1.14 + view(&a); 1.15 + return; 1.16 + } 1.17 + } 1.18 +} 1.19 + 1.20 +void 1.21 draw_bar() 1.22 { 1.23 int i;