Mercurial > aewl
diff view.c @ 675:1438e35b622e
reorganized
author | Anselm R. Garbe <arg@suckless.org> |
---|---|
date | Mon, 08 Jan 2007 17:36:56 +0100 |
parents | 5d79c351e30a |
children | 4dcbbfe9d137 |
line wrap: on
line diff
--- a/view.c Mon Jan 08 17:33:24 2007 +0100 +++ b/view.c Mon Jan 08 17:36:56 2007 +0100 @@ -153,8 +153,7 @@ if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh)) return; nmaster += arg->i; - snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); - bmw = textw(mtext); + updatemodetext(); if(sel) arrange(); else @@ -224,8 +223,7 @@ void togglemode(Arg *arg) { arrange = (arrange == dofloat) ? dotile : dofloat; - snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); - bmw = textw(mtext); + updatemodetext(); if(sel) arrange(); else @@ -244,6 +242,12 @@ } void +updatemodetext() { + snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); + bmw = textw(mtext); +} + +void view(Arg *arg) { unsigned int i;