made barclick to select the specific tag

This commit is contained in:
Anselm R. Garbe
2006-07-14 10:34:07 +02:00
parent 9cd686c93a
commit 6458d72572
6 changed files with 36 additions and 4 deletions

14
bar.c
View File

@ -5,6 +5,20 @@
#include "dwm.h"
void
barclick(XButtonPressedEvent *e)
{
int x = 0;
Arg a;
for(a.i = 0; a.i < TLast; a.i++) {
x += textw(tags[a.i]) + dc.font.height;
if(e->x < x) {
view(&a);
return;
}
}
}
void
draw_bar()
{