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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/client.c b/client.c
index b89264c..6a178f8 100644
--- a/client.c
+++ b/client.c
@@ -142,14 +142,14 @@ manage(Window w, XWindowAttributes *wa) {
 	}
 	else {
 		c->border = BORDERPX;
-		if(c->x < wax)
-			c->x = wax;
-		if(c->y < way)
-			c->y = way;
 		if(c->x + c->w + 2 * c->border > wax + waw)
 			c->x = wax + waw - c->w - 2 * c->border;
 		if(c->y + c->h + 2 * c->border > way + wah)
 			c->y = way + wah - c->h - 2 * c->border;
+		if(c->x < wax)
+			c->x = wax;
+		if(c->y < way)
+			c->y = way;
 	}
 	updatesizehints(c);
 	c->proto = getproto(c->win);
@@ -197,14 +197,14 @@ resize(Client *c, Bool sizehints) {
 	else
 		c->border = BORDERPX;
 	/* offscreen appearance fixes */
-	if(c->x + c->w + 2 * c->border < sx)
-		c->x = sx;
-	if(c->y + c->h + 2 * c->border < sy)
-		c->y = sy;
 	if(c->x > sw)
 		c->x = sw - c->w - 2 * c->border;
 	if(c->y > sh)
 		c->y = sh - c->h - 2 * c->border;
+	if(c->x + c->w + 2 * c->border < sx)
+		c->x = sx;
+	if(c->y + c->h + 2 * c->border < sy)
+		c->y = sy;
 	wc.x = c->x;
 	wc.y = c->y;
 	wc.width = c->w;
f92afb14db2bef2488e30'>39677ec ^
dc5d967 ^
39677ec ^
6a3ae5e ^
39677ec ^


39677ec ^
ca65478 ^
adaa28a ^
dc5d967 ^
adaa28a ^


849e631 ^
adaa28a ^


2c477cf ^
9955ddc ^
dc5d967 ^
9955ddc ^

2c477cf ^
439e15d ^
4230932 ^

439e15d ^



16c67f3 ^
2c477cf ^

439e15d ^

0464e42 ^
439e15d ^


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