equal
deleted
inserted
replaced
3 */ |
3 */ |
4 #include "dwm.h" |
4 #include "dwm.h" |
5 #include <string.h> |
5 #include <string.h> |
6 |
6 |
7 /* static */ |
7 /* static */ |
8 |
|
9 static unsigned int |
|
10 textnw(const char *text, unsigned int len) { |
|
11 XRectangle r; |
|
12 |
|
13 if(dc.font.set) { |
|
14 XmbTextExtents(dc.font.set, text, len, NULL, &r); |
|
15 return r.width; |
|
16 } |
|
17 return XTextWidth(dc.font.xfont, text, len); |
|
18 } |
|
19 |
8 |
20 static void |
9 static void |
21 drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) { |
10 drawsquare(Bool filled, Bool empty, unsigned long col[ColLast]) { |
22 int x; |
11 int x; |
23 XGCValues gcv; |
12 XGCValues gcv; |
44 |
33 |
45 for(c = clients; c; c = c->next) |
34 for(c = clients; c; c = c->next) |
46 if(c->tags[t]) |
35 if(c->tags[t]) |
47 return True; |
36 return True; |
48 return False; |
37 return False; |
|
38 } |
|
39 |
|
40 static unsigned int |
|
41 textnw(const char *text, unsigned int len) { |
|
42 XRectangle r; |
|
43 |
|
44 if(dc.font.set) { |
|
45 XmbTextExtents(dc.font.set, text, len, NULL, &r); |
|
46 return r.width; |
|
47 } |
|
48 return XTextWidth(dc.font.xfont, text, len); |
49 } |
49 } |
50 |
50 |
51 /* extern */ |
51 /* extern */ |
52 |
52 |
53 void |
53 void |