Mercurial > dwm-meillo
comparison 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 |
comparison
equal
deleted
inserted
replaced
57:f005d46462e8 | 58:1269bd127551 |
---|---|
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | 2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
3 * See LICENSE file for license details. | 3 * See LICENSE file for license details. |
4 */ | 4 */ |
5 | 5 |
6 #include "dwm.h" | 6 #include "dwm.h" |
7 | |
8 void | |
9 barclick(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 } | |
7 | 21 |
8 void | 22 void |
9 draw_bar() | 23 draw_bar() |
10 { | 24 { |
11 int i; | 25 int i; |