diff options
| author | arg@10ksloc.org <unknown> | 2006-07-20 15:07:35 +0200 |
|---|---|---|
| committer | arg@10ksloc.org <unknown> | 2006-07-20 15:07:35 +0200 |
| commit | 4688ad181da14be36e034918580ec0ce5968ffdb (patch) | |
| tree | e919b8e6e89400a8b5dac01fa611090f139d5b5f /tag.c | |
| parent | cleaned up code (diff) | |
| download | dwm-4688ad181da14be36e034918580ec0ce5968ffdb.tar.gz dwm-4688ad181da14be36e034918580ec0ce5968ffdb.zip | |
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
Diffstat (limited to 'tag.c')
| -rw-r--r-- | tag.c | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -51,8 +51,8 @@ dofloat(Arg *arg) | |||
| 51 | { | 51 | { |
| 52 | Client *c; | 52 | Client *c; |
| 53 | 53 | ||
| 54 | arrange = dofloat; | ||
| 55 | for(c = clients; c; c = c->next) { | 54 | for(c = clients; c; c = c->next) { |
| 55 | c->ismax = False; | ||
| 56 | if(c->tags[tsel]) { | 56 | if(c->tags[tsel]) { |
| 57 | resize(c, True, TopLeft); | 57 | resize(c, True, TopLeft); |
| 58 | } | 58 | } |
| @@ -75,7 +75,6 @@ dotile(Arg *arg) | |||
| 75 | Client *c; | 75 | Client *c; |
| 76 | 76 | ||
| 77 | w = sw - mw; | 77 | w = sw - mw; |
| 78 | arrange = dotile; | ||
| 79 | for(n = 0, c = clients; c; c = c->next) | 78 | for(n = 0, c = clients; c; c = c->next) |
| 80 | if(c->tags[tsel] && !c->isfloat) | 79 | if(c->tags[tsel] && !c->isfloat) |
| 81 | n++; | 80 | n++; |
| @@ -86,6 +85,7 @@ dotile(Arg *arg) | |||
| 86 | h = sh - bh; | 85 | h = sh - bh; |
| 87 | 86 | ||
| 88 | for(i = 0, c = clients; c; c = c->next) { | 87 | for(i = 0, c = clients; c; c = c->next) { |
| 88 | c->ismax = False; | ||
| 89 | if(c->tags[tsel]) { | 89 | if(c->tags[tsel]) { |
| 90 | if(c->isfloat) { | 90 | if(c->isfloat) { |
| 91 | higher(c); | 91 | higher(c); |
| @@ -213,6 +213,13 @@ settags(Client *c) | |||
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | void | 215 | void |
| 216 | togglemode(Arg *arg) | ||
| 217 | { | ||
| 218 | arrange = arrange == dofloat ? dotile : dofloat; | ||
| 219 | arrange(NULL); | ||
| 220 | } | ||
| 221 | |||
| 222 | void | ||
| 216 | view(Arg *arg) | 223 | view(Arg *arg) |
| 217 | { | 224 | { |
| 218 | tsel = arg->i; | 225 | tsel = arg->i; |
