summaryrefslogtreecommitdiffstats
path: root/bar.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bar.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/bar.c b/bar.c
index 9914e56..ea4b946 100644
--- a/bar.c
+++ b/bar.c
@@ -6,6 +6,20 @@
6#include "dwm.h" 6#include "dwm.h"
7 7
8void 8void
9barclick(XButtonPressedEvent *e)
10{
11 int x = 0;
12 Arg a;
13 for(a.i = 0; a.i < TLast; a.i++) {
14 x += textw(tags[a.i]) + dc.font.height;
15 if(e->x < x) {
16 view(&a);
17 return;
18 }
19 }
20}
21
22void
9draw_bar() 23draw_bar()
10{ 24{
11 int i; 25 int i;