about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client.c2
-rw-r--r--tag.c9
-rw-r--r--view.c25
3 files changed, 17 insertions, 19 deletions
diff --git a/client.c b/client.c
index 4f2a69c..ecb9178 100644
--- a/client.c
+++ b/client.c
@@ -247,6 +247,8 @@ manage(Window w, XWindowAttributes *wa)
 		c->isfloat = trans
 			|| (c->maxw && c->minw &&
 				c->maxw == c->minw && c->maxh == c->minh);
+	if(c->isfloat)
+		c->weight = ntags;
 
 	if(clients)
 		clients->prev = c;
diff --git a/tag.c b/tag.c
index 9e997f9..48abc26 100644
--- a/tag.c
+++ b/tag.c
@@ -106,7 +106,8 @@ settags(Client *c)
 	if(!matched)
 		for(i = 0; i < ntags; i++)
 			c->tags[i] = seltag[i];
-	for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
+	if(!c->isfloat)
+		for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
 }
 
 void
@@ -120,7 +121,8 @@ tag(Arg *arg)
 	for(i = 0; i < ntags; i++)
 		sel->tags[i] = False;
 	sel->tags[arg->i] = True;
-	sel->weight = arg->i;
+	if(!sel->isfloat)
+		sel->weight = arg->i;
 	arrange(NULL);
 }
 
@@ -136,6 +138,7 @@ toggletag(Arg *arg)
 	for(i = 0; i < ntags && !sel->tags[i]; i++);
 	if(i == ntags)
 		sel->tags[arg->i] = True;
-	sel->weight = (i == ntags) ? arg->i : i;
+	if(!sel->isfloat)
+		sel->weight = (i == ntags) ? arg->i : i;
 	arrange(NULL);
 }
diff --git a/view.c b/view.c
index 561d4ef..8df93ef 100644
--- a/view.c
+++ b/view.c
@@ -82,8 +82,8 @@ dotile(Arg *arg)
 	maximized = False;
 
 	w = sw - mw;
-	for(n = 0, c = clients; c; c = c->next)
-		if(isvisible(c) && !c->isfloat)
+	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
+		if(isvisible(c))
 			n++;
 
 	if(n > 1)
@@ -186,8 +186,8 @@ resizecol(Arg *arg)
 	unsigned int n;
 	Client *c;
 
-	for(n = 0, c = clients; c; c = c->next)
-		if(isvisible(c) && !c->isfloat)
+	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
+		if(isvisible(c))
 			n++;
 	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
 		return;
@@ -311,22 +311,15 @@ zoom(Arg *arg)
 	unsigned int n;
 	Client *c;
 
-	for(n = 0, c = clients; c; c = c->next)
-		if(isvisible(c) && !c->isfloat)
+	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
+		if(isvisible(c))
 			n++;
 	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
 		return;
 
-	/* this is somewhat tricky, it asserts to only zoom tiled clients */
-	for(c = getnext(clients); c && c->isfloat; c = getnext(c->next));
-	if(c) {
-		if(c == sel)
-			for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
-		else
-			c = sel;
-	}
-	if(!c)
-		return;
+	if((c = sel) == getnext(clients))
+		if(!(c = getnext(c->next)) || c->isfloat)
+			return;
 	detach(c);
 	c->next = clients;
 	clients->prev = c;
e7'>e99038ea ^
ec32c11d ^
3350c34a ^
1a4de9dd ^















695f9bf8 ^
1a4de9dd ^















3350c34a ^
1a4de9dd ^
14a38052 ^
c56d803c ^
60338448 ^
a8fb537a ^
3350c34a ^
c56d803c ^


1a4de9dd ^
a0d3cac4 ^
14a38052 ^


1a4de9dd ^
e99038ea ^
c56d803c ^
33352536 ^


c56d803c ^
b1635a5c ^
33352536 ^
14a38052 ^

33352536 ^
14a38052 ^
33352536 ^
14a38052 ^
a0d3cac4 ^

33352536 ^
3350c34a ^
a0d3cac4 ^


2104d1a7 ^
a0d3cac4 ^









c52ae116 ^
6070c23e ^
a0d3cac4 ^

6070c23e ^
a0d3cac4 ^



4a4a392d ^
a0d3cac4 ^

c52ae116 ^
6070c23e ^
a0d3cac4 ^








1a4de9dd ^



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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132