comparison client.c @ 94:6efe82c775c9

pop on heretag
author Anselm R. Garbe <garbeam@wmii.de>
date Tue, 18 Jul 2006 11:45:32 +0200
parents c498da7520c7
children 5d88952cbf96
comparison
equal deleted inserted replaced
93:c498da7520c7 94:6efe82c775c9
263 sel->y = sy + bh; 263 sel->y = sy + bh;
264 sel->w = sw - 2 * sel->border; 264 sel->w = sw - 2 * sel->border;
265 sel->h = sh - 2 * sel->border - bh; 265 sel->h = sh - 2 * sel->border - bh;
266 higher(sel); 266 higher(sel);
267 resize(sel, False); 267 resize(sel, False);
268 }
269
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);
268 } 280 }
269 281
270 void 282 void
271 resize(Client *c, Bool inc) 283 resize(Client *c, Bool inc)
272 { 284 {
403 } 415 }
404 416
405 void 417 void
406 zoom(Arg *arg) 418 zoom(Arg *arg)
407 { 419 {
408 Client **l, *c; 420 Client *c;
409 421
410 if(!sel) 422 if(!sel)
411 return; 423 return;
412 424
413 if(sel == getnext(clients, tsel) && sel->next) { 425 if(sel == getnext(clients, tsel) && sel->next) {
414 if((c = getnext(sel->next, tsel))) 426 if((c = getnext(sel->next, tsel)))
415 sel = c; 427 sel = c;
416 } 428 }
417 429
418 for(l = &clients; *l && *l != sel; l = &(*l)->next); 430 pop(sel);
419 *l = sel->next;
420
421 sel->next = clients; /* pop */
422 clients = sel;
423 arrange(NULL);
424 focus(sel); 431 focus(sel);
425 } 432 }