about summary refs log tree commit diff stats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/client.c b/client.c
index e0ab719..3aae7e0 100644
--- a/client.c
+++ b/client.c
@@ -404,8 +404,6 @@ manage(Window w, XWindowAttributes *wa)
 	c->next = *l; /* *l == nil */
 	*l = c;
 
-	XMapRaised(dpy, c->win);
-	XMapRaised(dpy, c->title);
 	XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
 			GrabModeAsync, GrabModeSync, None, None);
 	XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
@@ -418,10 +416,17 @@ manage(Window w, XWindowAttributes *wa)
 			|| ((c->maxw == c->minw) && (c->maxh == c->minh));
 
 	arrange(NULL);
-	if(c->tags[tsel])
+	/* mapping the window now prevents flicker */
+	if(c->tags[tsel]) {
+		XMapRaised(dpy, c->win);
+		XMapRaised(dpy, c->title);
 		focus(c);
-	else
+	}
+	else {
 		ban_client(c);
+		XMapRaised(dpy, c->win);
+		XMapRaised(dpy, c->title);
+	}
 }
 
 void
5 +0100 this looks better now ;)' href='/acidbong/suckless/dwm/commit/config.arg.h?h=5.3&id=58beead14d79ba42acc6357d450c4125e3e8407a'>58beead ^
02d5ddd ^
84ae6e1 ^
58beead ^
a73a882 ^
12280f0 ^
3794c62 ^

f196b71 ^

338c083 ^
f196b71 ^




3794c62 ^
f196b71 ^
3794c62 ^



338c083 ^
3794c62 ^
cac492b ^
f196b71 ^
cac492b ^
3794c62 ^
f196b71 ^

b38905b ^
a73a882 ^
3059c9c ^
3171371 ^
0ea0343 ^
e701394 ^
3171371 ^
0ea0343 ^
2c477cf ^
2aef8b9 ^
ef9b3e1 ^

2122e39 ^

27b0595 ^

2c477cf ^

338c083 ^
2c477cf ^







































a73a882 ^
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