diff options
author | Anselm R. Garbe <arg@suckless.org> | 2007-01-08 17:36:56 +0100 |
---|---|---|
committer | Anselm R. Garbe <arg@suckless.org> | 2007-01-08 17:36:56 +0100 |
commit | 5a5851bac2670624f30c84efe4129f0101f62255 (patch) | |
tree | 41930b067cc1d4c42d928bc5dc58b9124d797c76 /view.c | |
parent | 1d4a24dae02cfb3a3241c3d293e96dba910317bd (diff) | |
download | dwm-5a5851bac2670624f30c84efe4129f0101f62255.tar.gz |
reorganized
Diffstat (limited to 'view.c')
-rw-r--r-- | view.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -153,8 +153,7 @@ incnmaster(Arg *arg) { 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 @@ togglefloat(Arg *arg) { 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 @@ toggleview(Arg *arg) { } void +updatemodetext() { + snprintf(mtext, sizeof mtext, arrange == dofloat ? FLOATSYMBOL : TILESYMBOL, nmaster); + bmw = textw(mtext); +} + +void view(Arg *arg) { unsigned int i; |