about summary refs log tree commit diff stats
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'view.c')
-rw-r--r--view.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/view.c b/view.c
index 81dd4b3..de3328e 100644
--- a/view.c
+++ b/view.c
@@ -98,11 +98,11 @@ dotile(void) {
 			else {  /* tile window */
 				c->x += mw;
 				c->w = tw - 2 * BORDERPX;
-				if(th > bh) {
+				if(th - 2 * BORDERPX > bh) {
 					c->y += (i - nmaster) * th;
 					c->h = th - 2 * BORDERPX;
 				}
-				else /* fallback if th < bh */
+				else /* fallback if th - 2 * BORDERPX < bh */
 					c->h = wah - 2 * BORDERPX;
 			}
 			resize(c, False);
@@ -149,7 +149,8 @@ focusprev(Arg *arg) {
 
 void
 incnmaster(Arg *arg) {
-	if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh))
+	if((arrange == dofloat) || (nmaster + arg->i < 1)
+		|| (wah / (nmaster + arg->i) - 2 * BORDERPX < bh))
 		return;
 	nmaster += arg->i;
 	if(sel)
@@ -173,7 +174,8 @@ resizemaster(Arg *arg) {
 	if(arg->i == 0)
 		master = MASTER;
 	else {
-		if(master + arg->i > 950 || master + arg->i < 50)
+		if(waw * (master + arg->i) / 1000 > waw - bh - 2 * BORDERPX
+			|| waw * (master + arg->i) / 1000 < bh + 2 * BORDERPX)
 			return;
 		master += arg->i;
 	}
.arg.h?h=6.2&id=9833610356f7ce033589680fddf87000e5788774'>^
00e95e1 ^
5cf362c ^

97ced11 ^

5cf362c ^

b55bd70 ^
0384fae ^
97ced11 ^
a73a882 ^
b38905b ^
a73a882 ^
292ccc4 ^
f1fe19b ^
0a07591 ^
f1fe19b ^
9927b9e ^
4ee05b3 ^

97ced11 ^
f1fe19b ^

292ccc4 ^
fee8df6 ^
0384fae ^

19da197 ^


7b6d5ff ^
19da197 ^


7b6d5ff ^
ce04a66 ^

bab575c ^
ce04a66 ^


7b6d5ff ^
ce04a66 ^


7b6d5ff ^
ce04a66 ^
a73a882 ^



d6a6eca ^
c045459 ^
e21d93b ^
f1fe19b ^

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