about summary refs log tree commit diff stats
path: root/view.c
diff options
context:
space:
mode:
authorarg@mmvi <unknown>2006-09-22 07:37:56 +0200
committerarg@mmvi <unknown>2006-09-22 07:37:56 +0200
commitd800ec05ff63451193a0b858c114f5144534c2a1 (patch)
treecc6261bca4c022b6a22d0a1568bf3ea3ec4c9c06 /view.c
parentbda53ac6ad834824e8e5d5678ccd638a122c173a (diff)
downloaddwm-d800ec05ff63451193a0b858c114f5144534c2a1.tar.gz
implemented the maximization as I described on the mailinglist, this feels better to me.
Diffstat (limited to 'view.c')
-rw-r--r--view.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/view.c b/view.c
index 80d483a..fce7309 100644
--- a/view.c
+++ b/view.c
@@ -61,8 +61,6 @@ void
 dofloat(Arg *arg) {
 	Client *c;
 
-	maximized = False;
-
 	for(c = clients; c; c = c->next) {
 		if(isvisible(c)) {
 			resize(c, True, TopLeft);
@@ -82,8 +80,6 @@ dotile(Arg *arg) {
 	int h, i, n, w;
 	Client *c;
 
-	maximized = False;
-
 	w = sw - mw;
 	for(n = 0, c = clients; c; c = c->next)
 		if(isvisible(c) && !c->isfloat)
@@ -190,7 +186,7 @@ resizecol(Arg *arg) {
 	for(n = 0, c = clients; c; c = c->next)
 		if(isvisible(c) && !c->isfloat)
 			n++;
-	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
+	if(!sel || sel->isfloat || n < 2 || (arrange != dotile))
 		return;
 
 	if(sel == getnext(clients)) {
@@ -273,13 +269,28 @@ viewall(Arg *arg) {
 
 void
 zoom(Arg *arg) {
+	int tmp;
 	unsigned int n;
 	Client *c;
+	XEvent ev;
+
+	if(!sel)
+		return;
+
+	if(sel->isfloat || (arrange == dofloat)) {
+		tmp = sel->x; sel->x = sel->rx; sel->rx = tmp;
+		tmp = sel->y; sel->y = sel->ry; sel->ry = tmp;
+		tmp = sel->w; sel->w = sel->rw; sel->rw = tmp;
+		tmp = sel->h; sel->h = sel->rh; sel->rh = tmp;
+		resize(sel, True, TopLeft);
+		while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+		return;
+	}
 
 	for(n = 0, c = clients; c; c = c->next)
 		if(isvisible(c) && !c->isfloat)
 			n++;
-	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
+	if(n < 2 || (arrange != dotile))
 		return;
 
 	if((c = sel) == nexttiled(clients))
Garbe <arg@suckless.org> 2007-01-22 16:02:37 +0100 committer Anselm R. Garbe <arg@suckless.org> 2007-01-22 16:02:37 +0100 darker border' href='/acidbong/suckless/dwm/commit/config.arg.h?h=5.6.1&id=04a2b745299668890ae8571d6812514dbd487245'>04a2b74 ^
1d63030 ^
58beead ^
b55bd70 ^
19390b1 ^
97ced11 ^
c2b753d ^
19390b1 ^
d2dd58e ^
a73a882 ^
b38905b ^
a73a882 ^
3059c9c ^
19dcbc5 ^
58beead ^
19dcbc5 ^
b60406c ^
9e4e4d9 ^

19dcbc5 ^




3059c9c ^

42fd392 ^
19dcbc5 ^



11a08b9 ^
e1811c3 ^



19dcbc5 ^



11a08b9 ^
e1811c3 ^



19dcbc5 ^


42fd392 ^
19dcbc5 ^



11a08b9 ^
e1811c3 ^



19dcbc5 ^



11a08b9 ^
e1811c3 ^



19dcbc5 ^
a73a882 ^



d6a6eca ^
2d7f594 ^



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