diff options
| author | arg@mmvi <unknown> | 2006-09-22 07:37:56 +0200 |
|---|---|---|
| committer | arg@mmvi <unknown> | 2006-09-22 07:37:56 +0200 |
| commit | d800ec05ff63451193a0b858c114f5144534c2a1 (patch) | |
| tree | cc6261bca4c022b6a22d0a1568bf3ea3ec4c9c06 /view.c | |
| parent | reviewed client.c (diff) | |
| download | dwm-d800ec05ff63451193a0b858c114f5144534c2a1.tar.gz dwm-d800ec05ff63451193a0b858c114f5144534c2a1.zip | |
implemented the maximization as I described on the mailinglist, this feels better to me.
Diffstat (limited to '')
| -rw-r--r-- | view.c | 23 |
1 files changed, 17 insertions, 6 deletions
| @@ -61,8 +61,6 @@ void | |||
| 61 | dofloat(Arg *arg) { | 61 | dofloat(Arg *arg) { |
| 62 | Client *c; | 62 | Client *c; |
| 63 | 63 | ||
| 64 | maximized = False; | ||
| 65 | |||
| 66 | for(c = clients; c; c = c->next) { | 64 | for(c = clients; c; c = c->next) { |
| 67 | if(isvisible(c)) { | 65 | if(isvisible(c)) { |
| 68 | resize(c, True, TopLeft); | 66 | resize(c, True, TopLeft); |
| @@ -82,8 +80,6 @@ dotile(Arg *arg) { | |||
| 82 | int h, i, n, w; | 80 | int h, i, n, w; |
| 83 | Client *c; | 81 | Client *c; |
| 84 | 82 | ||
| 85 | maximized = False; | ||
| 86 | |||
| 87 | w = sw - mw; | 83 | w = sw - mw; |
| 88 | for(n = 0, c = clients; c; c = c->next) | 84 | for(n = 0, c = clients; c; c = c->next) |
| 89 | if(isvisible(c) && !c->isfloat) | 85 | if(isvisible(c) && !c->isfloat) |
| @@ -190,7 +186,7 @@ resizecol(Arg *arg) { | |||
| 190 | for(n = 0, c = clients; c; c = c->next) | 186 | for(n = 0, c = clients; c; c = c->next) |
| 191 | if(isvisible(c) && !c->isfloat) | 187 | if(isvisible(c) && !c->isfloat) |
| 192 | n++; | 188 | n++; |
| 193 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) | 189 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile)) |
| 194 | return; | 190 | return; |
| 195 | 191 | ||
| 196 | if(sel == getnext(clients)) { | 192 | if(sel == getnext(clients)) { |
| @@ -273,13 +269,28 @@ viewall(Arg *arg) { | |||
| 273 | 269 | ||
| 274 | void | 270 | void |
| 275 | zoom(Arg *arg) { | 271 | zoom(Arg *arg) { |
| 272 | int tmp; | ||
| 276 | unsigned int n; | 273 | unsigned int n; |
| 277 | Client *c; | 274 | Client *c; |
| 275 | XEvent ev; | ||
| 276 | |||
| 277 | if(!sel) | ||
| 278 | return; | ||
| 279 | |||
| 280 | if(sel->isfloat || (arrange == dofloat)) { | ||
| 281 | tmp = sel->x; sel->x = sel->rx; sel->rx = tmp; | ||
| 282 | tmp = sel->y; sel->y = sel->ry; sel->ry = tmp; | ||
| 283 | tmp = sel->w; sel->w = sel->rw; sel->rw = tmp; | ||
| 284 | tmp = sel->h; sel->h = sel->rh; sel->rh = tmp; | ||
| 285 | resize(sel, True, TopLeft); | ||
| 286 | while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); | ||
| 287 | return; | ||
| 288 | } | ||
| 278 | 289 | ||
| 279 | for(n = 0, c = clients; c; c = c->next) | 290 | for(n = 0, c = clients; c; c = c->next) |
| 280 | if(isvisible(c) && !c->isfloat) | 291 | if(isvisible(c) && !c->isfloat) |
| 281 | n++; | 292 | n++; |
| 282 | if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized) | 293 | if(n < 2 || (arrange != dotile)) |
| 283 | return; | 294 | return; |
| 284 | 295 | ||
| 285 | if((c = sel) == nexttiled(clients)) | 296 | if((c = sel) == nexttiled(clients)) |
