diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-14 10:34:07 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-14 10:34:07 +0200 |
| commit | 6458d72572a30d2cc4af3385755033b2cca93057 (patch) | |
| tree | 158be70ab7a84b729a66f0532c08aa7b336db217 /bar.c | |
| parent | implemented bar for dwm (I miss status text), I plan that status text is read... (diff) | |
| download | dwm-6458d72572a30d2cc4af3385755033b2cca93057.tar.gz dwm-6458d72572a30d2cc4af3385755033b2cca93057.zip | |
made barclick to select the specific tag
Diffstat (limited to '')
| -rw-r--r-- | bar.c | 14 |
1 files changed, 14 insertions, 0 deletions
| @@ -6,6 +6,20 @@ | |||
| 6 | #include "dwm.h" | 6 | #include "dwm.h" |
| 7 | 7 | ||
| 8 | void | 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 | } | ||
| 21 | |||
| 22 | void | ||
| 9 | draw_bar() | 23 | draw_bar() |
| 10 | { | 24 | { |
| 11 | int i; | 25 | int i; |
