about summary refs log tree commit diff stats
path: root/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/draw.c b/draw.c
index 6edb0a3..0ded26b 100644
--- a/draw.c
+++ b/draw.c
@@ -65,12 +65,12 @@ drawtext(const char *text, Bool invert)
 	while(len && (w = textnw(buf, len)) > dc.w - h)
 		buf[--len] = 0;
 	if(len < olen) {
+		if(len > 1)
+			buf[len - 1] = '.';
+		if(len > 2)
+			buf[len - 2] = '.';
 		if(len > 3)
-			memcpy(buf + len - 4, "...\0", 4);
-		else if(len > 2)
-			memcpy(buf + len - 3, "..\0", 3);
-		else if(len > 1)
-			memcpy(buf + len - 2, ".\0", 2);
+			buf[len - 3] = '.';
 	}
 
 	if(w > dc.w)
@@ -160,7 +160,7 @@ drawtitle(Client *c)
 		}
 	}
 	dc.x += dc.w;
-	dc.w = textw(c->name);
+	dc.w = c->tw - dc.x;
 	drawtext(c->name, !istile);
 	XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0);
 	XSync(dpy, False);
lt;hut@lavabit.com> 2010-05-07 18:02:06 +0200 committer hut <hut@lavabit.com> 2010-05-10 21:03:41 +0200 Makefile: updated' href='/akspecs/ranger/commit/Makefile?id=3a1e1f28fa847df5021b37d4c81eb4dfa01f5a8e'>3a1e1f28 ^
2c5ea01d ^
5fca2a0b ^
b0a216f5 ^
2c5ea01d ^
b0a216f5 ^



3a1e1f28 ^
b0a216f5 ^


5fca2a0b ^
b0b3af33 ^


b0a216f5 ^
b0b3af33 ^

2c5ea01d ^
5fca2a0b ^
b0b3af33 ^
2c5ea01d ^
582f3519 ^
b06433bc ^
582f3519 ^

94c5d83e ^
dee6cfa6 ^
e9e4b4ff ^
b0a216f5 ^
a082b66a ^

b0a216f5 ^
e9e4b4ff ^





ad75190c ^
e9e4b4ff ^
5fca2a0b ^





c7720fff ^



8d21b83c ^


e9e4b4ff ^
25a4162d ^
e9e4b4ff ^
0c2c782d ^
636d9393 ^
b0a216f5 ^
c0d63e78 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93