about summary refs log tree commit diff stats
path: root/client.c
diff options
context:
space:
mode:
authorarg@mmvi <unknown>2006-09-15 10:54:32 +0200
committerarg@mmvi <unknown>2006-09-15 10:54:32 +0200
commit28aba061ec2a6fa7923ea00b43e1335a27a73c06 (patch)
tree8ccbb6eda2079281cc8b3a7005c2fbd22c4814c4 /client.c
parent8e37c78ce3c33842a5800a445f90a3079a377eb6 (diff)
downloaddwm-28aba061ec2a6fa7923ea00b43e1335a27a73c06.tar.gz
offscreen client appearance fixes
Diffstat (limited to 'client.c')
-rw-r--r--client.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/client.c b/client.c
index dce06e9..33b3c56 100644
--- a/client.c
+++ b/client.c
@@ -281,6 +281,16 @@ resize(Client *c, Bool sizehints, Corner sticky) {
 	if(sticky == BotLeft || sticky == BotRight)
 		c->y = bottom - c->h;
 
+	/* offscreen appearance fixes */
+	if(c->x + c->w < 0)
+		c->x = 0;
+	if(c->y + c->h < bh)
+		c->y = bh;
+	if(c->x > sw)
+		c->x = sw - c->w;
+	if(c->y > sh)
+		c->y = sh - c->h;
+
 	resizetitle(c);
 	wc.x = c->x;
 	wc.y = c->y;
.org> 2006-08-14 08:43:19 +0200 applied Sanders LD and resize patches' href='/acidbong/suckless/dwm/commit/Makefile?h=4.7&id=95766d6241a401b3665ac1ad528b90c55e7b6810'>95766d6 ^
dbf7e03 ^
1076f2b



42277b1 ^
5d3fd37 ^
a2d56f6 ^
99b126d ^

1076f2b
650a1fb ^
1076f2b
95766d6 ^
82064af ^
1076f2b

4d55eee ^
db876f9 ^
dbf7e03 ^

4d55eee ^






dbf7e03 ^

4d55eee ^
dbf7e03 ^
4d55eee ^


dbf7e03 ^
d9386a0 ^
4d55eee ^
dbf7e03 ^

4d55eee ^



dc5c070 ^

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