no, ordering floating clients at the end seems better 0d0e8bde
Anselm R. Garbe · 2006-09-05 19:26 3 file(s) · +17 −19
client.c +2 −0
247 247
		c->isfloat = trans
248 248
			|| (c->maxw && c->minw &&
249 249
				c->maxw == c->minw && c->maxh == c->minh);
250 +
	if(c->isfloat)
251 +
		c->weight = ntags;
250 252
251 253
	if(clients)
252 254
		clients->prev = c;
tag.c +6 −3
106 106
	if(!matched)
107 107
		for(i = 0; i < ntags; i++)
108 108
			c->tags[i] = seltag[i];
109 -
	for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
109 +
	if(!c->isfloat)
110 +
		for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
110 111
}
111 112
112 113
void
120 121
	for(i = 0; i < ntags; i++)
121 122
		sel->tags[i] = False;
122 123
	sel->tags[arg->i] = True;
123 -
	sel->weight = arg->i;
124 +
	if(!sel->isfloat)
125 +
		sel->weight = arg->i;
124 126
	arrange(NULL);
125 127
}
126 128
136 138
	for(i = 0; i < ntags && !sel->tags[i]; i++);
137 139
	if(i == ntags)
138 140
		sel->tags[arg->i] = True;
139 -
	sel->weight = (i == ntags) ? arg->i : i;
141 +
	if(!sel->isfloat)
142 +
		sel->weight = (i == ntags) ? arg->i : i;
140 143
	arrange(NULL);
141 144
}
view.c +9 −16
82 82
	maximized = False;
83 83
84 84
	w = sw - mw;
85 -
	for(n = 0, c = clients; c; c = c->next)
86 -
		if(isvisible(c) && !c->isfloat)
85 +
	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
86 +
		if(isvisible(c))
87 87
			n++;
88 88
89 89
	if(n > 1)
186 186
	unsigned int n;
187 187
	Client *c;
188 188
189 -
	for(n = 0, c = clients; c; c = c->next)
190 -
		if(isvisible(c) && !c->isfloat)
189 +
	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
190 +
		if(isvisible(c))
191 191
			n++;
192 192
	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
193 193
		return;
311 311
	unsigned int n;
312 312
	Client *c;
313 313
314 -
	for(n = 0, c = clients; c; c = c->next)
315 -
		if(isvisible(c) && !c->isfloat)
314 +
	for(n = 0, c = clients; c && !c->isfloat; c = c->next)
315 +
		if(isvisible(c))
316 316
			n++;
317 317
	if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
318 318
		return;
319 319
320 -
	/* this is somewhat tricky, it asserts to only zoom tiled clients */
321 -
	for(c = getnext(clients); c && c->isfloat; c = getnext(c->next));
322 -
	if(c) {
323 -
		if(c == sel)
324 -
			for(c = getnext(c->next); c && c->isfloat; c = getnext(c->next));
325 -
		else
326 -
			c = sel;
327 -
	}
328 -
	if(!c)
329 -
		return;
320 +
	if((c = sel) == getnext(clients))
321 +
		if(!(c = getnext(c->next)) || c->isfloat)
322 +
			return;
330 323
	detach(c);
331 324
	c->next = clients;
332 325
	clients->prev = c;