about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.def.h2
-rw-r--r--dwm.c10
2 files changed, 3 insertions, 9 deletions
diff --git a/config.def.h b/config.def.h
index b18af75..83a8c18 100644
--- a/config.def.h
+++ b/config.def.h
@@ -24,7 +24,7 @@ Rule rules[] = {
 
 /* layout(s) */
 double mfact           = 0.55;
-Bool resizehints       = True;     /* False means respect size hints in tiled resizals */
+Bool resizehints       = False;     /* False means respect size hints in tiled resizals */
 
 Layout layouts[] = {
 	/* symbol     arrange function */
diff --git a/dwm.c b/dwm.c
index 4d4c769..3b6efaa 100644
--- a/dwm.c
+++ b/dwm.c
@@ -571,14 +571,8 @@ drawtext(const char *text, ulong col[ColLast], Bool invert) {
 	for(; len && (w = textnw(buf, len)) > dc.w - h; len--);
 	if(!len)
 		return;
-	if(len < olen) {
-		if(len > 1)
-			buf[len - 1] = '.';
-		if(len > 2)
-			buf[len - 2] = '.';
-		if(len > 3)
-			buf[len - 3] = '.';
-	}
+	if(len < olen)
+		strncpy(&buf[MAX(0, len - 3)], "...", len);
 	XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
 	if(dc.font.set)
 		XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
devel&id=355ae07b8f3362af4e90770477d344dcd2fef594'>^
9de3bc8ef ^

51672aef7 ^
b64eeeb43 ^




51672aef7 ^



b64eeeb43 ^








9de3bc8ef ^
b64eeeb43 ^


9de3bc8ef ^



b64eeeb43 ^



9de3bc8ef ^
b64eeeb43 ^




9de3bc8ef ^
b64eeeb43 ^
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
94
95
96
97
98
99
100
101
102