From 6458d72572a30d2cc4af3385755033b2cca93057 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 14 Jul 2006 10:34:07 +0200 Subject: made barclick to select the specific tag --- bar.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bar.c') diff --git a/bar.c b/bar.c index 9914e565..ea4b946b 100644 --- a/bar.c +++ b/bar.c @@ -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() { -- cgit v1.2.3