dwm.c
changeset 1356 d2658eac8ff9
parent 1355 9172f2200001
child 1357 33591b7c6bf7
equal deleted inserted replaced
1355:9172f2200001 1356:d2658eac8ff9
   270 		c->tags = tagset[seltags];
   270 		c->tags = tagset[seltags];
   271 }
   271 }
   272 
   272 
   273 void
   273 void
   274 arrange(void) {
   274 arrange(void) {
   275 	if(stack)
   275 	showhide(stack);
   276 		showhide(stack);
       
   277 	focus(NULL);
   276 	focus(NULL);
   278 	if(lt[sellt]->arrange)
   277 	if(lt[sellt]->arrange)
   279 		lt[sellt]->arrange();
   278 		lt[sellt]->arrange();
   280 	restack();
   279 	restack();
   281 }
   280 }
  1367 	grabkeys();
  1366 	grabkeys();
  1368 }
  1367 }
  1369 
  1368 
  1370 void
  1369 void
  1371 showhide(Client *c) {
  1370 showhide(Client *c) {
       
  1371 	if(!c)
       
  1372 		return;
  1372 	if(ISVISIBLE(c)) { /* show clients top down */
  1373 	if(ISVISIBLE(c)) { /* show clients top down */
  1373 		XMoveWindow(dpy, c->win, c->x, c->y);
  1374 		XMoveWindow(dpy, c->win, c->x, c->y);
  1374 		if(!lt[sellt]->arrange || c->isfloating)
  1375 		if(!lt[sellt]->arrange || c->isfloating)
  1375 			resize(c, c->x, c->y, c->w, c->h, True);
  1376 			resize(c, c->x, c->y, c->w, c->h, True);
  1376 	}
       
  1377 	if(c->snext) /* hide clients bottom up */
       
  1378 		showhide(c->snext);
  1377 		showhide(c->snext);
  1379 	if(!ISVISIBLE(c))
  1378 	}
       
  1379 	else { /* hide clients bottom up */
       
  1380 		showhide(c->snext);
  1380 		XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
  1381 		XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
       
  1382 	}
  1381 }
  1383 }
  1382 
  1384 
  1383 void
  1385 void
  1384 spawn(const Arg *arg) {
  1386 spawn(const Arg *arg) {
  1385 	/* The double-fork construct avoids zombie processes and keeps the code
  1387 	/* The double-fork construct avoids zombie processes and keeps the code