pop on heretag 0aaa9a21
Anselm R. Garbe · 2006-07-18 11:45 3 file(s) · +16 −8
client.c +14 −7
268 268
}
269 269
270 270
void
271 +
pop(Client *c)
272 +
{
273 +
	Client **l;
274 +
	for(l = &clients; *l && *l != c; l = &(*l)->next);
275 +
	*l = c->next;
276 +
277 +
	c->next = clients; /* pop */
278 +
	clients = c;
279 +
	arrange(NULL);
280 +
}
281 +
282 +
void
271 283
resize(Client *c, Bool inc)
272 284
{
273 285
	XConfigureEvent e;
405 417
void
406 418
zoom(Arg *arg)
407 419
{
408 -
	Client **l, *c;
420 +
	Client *c;
409 421
410 422
	if(!sel)
411 423
		return;
415 427
			sel = c;
416 428
	}
417 429
418 -
	for(l = &clients; *l && *l != sel; l = &(*l)->next);
419 -
	*l = sel->next;
420 -
421 -
	sel->next = clients; /* pop */
422 -
	clients = sel;
423 -
	arrange(NULL);
430 +
	pop(sel);
424 431
	focus(sel);
425 432
}
dwm.h +1 −0
118 118
extern void lower(Client *c);
119 119
extern void manage(Window w, XWindowAttributes *wa);
120 120
extern void maximize(Arg *arg);
121 +
extern void pop(Client *c);
121 122
extern void resize(Client *c, Bool inc);
122 123
extern void setsize(Client *c);
123 124
extern void settitle(Client *c);
tag.c +1 −1
136 136
	for(i = 0; i < TLast; i++)
137 137
		c->tags[i] = NULL;
138 138
	c->tags[tsel] = tags[tsel];
139 -
	arrange(NULL);
139 +
	pop(c);
140 140
	focus(c);
141 141
}
142 142