dwm.c
changeset 1502 15761ac5e2f1
parent 1500 48c3f87c335d
child 1508 0bee7022aca5
equal deleted inserted replaced
1501:496694696a61 1502:15761ac5e2f1
  1447 
  1447 
  1448 void
  1448 void
  1449 setlayout(const Arg *arg) {
  1449 setlayout(const Arg *arg) {
  1450 	if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
  1450 	if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
  1451 		selmon->sellt ^= 1;
  1451 		selmon->sellt ^= 1;
  1452 	if(arg && arg->v) {
  1452 	if(arg && arg->v)
  1453 		selmon->lt[selmon->sellt] = (Layout *)arg->v;
  1453 		selmon->lt[selmon->sellt] = (Layout *)arg->v;
  1454 		strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
  1454 	strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
  1455 	}
       
  1456 	if(selmon->sel)
  1455 	if(selmon->sel)
  1457 		arrange(selmon);
  1456 		arrange(selmon);
  1458 	else
  1457 	else
  1459 		drawbar(selmon);
  1458 		drawbar(selmon);
  1460 }
  1459 }