about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 64bafb7..f4b0540 100644
--- a/dwm.c
+++ b/dwm.c
@@ -913,7 +913,8 @@ manage(Window w, XWindowAttributes *wa) {
 		if(c->y + c->h + 2 * c->bw > sy + sh)
 			c->y = sy + sh - c->h - 2 * c->bw;
 		c->x = MAX(c->x, sx);
-		c->y = MAX(c->y, by == 0 ? bh : sy);
+		/* only fix client y-offset, if the client center might cover the bar */
+		c->y = MAX(c->y, ((by == 0) && (c->x + (c->w / 2) >= wx) && (c->x + (c->w / 2) < wx + ww)) ? bh : sy);
 		c->bw = borderpx;
 	}
 
63dda0a5ac92a5ad8c88fce6f0d1'>^
c912b731 ^
f0cf7af7 ^

34514ae8 ^
f0cf7af7 ^
ecbdc925 ^
f0cf7af7 ^

c912b731 ^


a232af2f ^
11f7f7b8 ^
c912b731 ^
11f7f7b8 ^
5763322b ^
5763322b ^
11f7f7b8 ^
5763322b ^
11f7f7b8 ^

5763322b ^
11f7f7b8 ^
f898ee7a ^
11f7f7b8 ^
c912b731 ^





a232af2f ^
11f7f7b8 ^

5763322b ^


f0f16bdf ^
c912b731 ^
5763322b ^
c912b731 ^
53172ce1 ^
ecbdc925 ^
a232af2f ^


11f7f7b8 ^
c912b731 ^
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