diff options
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -230,13 +230,14 @@ manage(Window w, XWindowAttributes *wa) { | |||
| 230 | setclientstate(c, IconicState); | 230 | setclientstate(c, IconicState); |
| 231 | c->isbanned = True; | 231 | c->isbanned = True; |
| 232 | focus(c); | 232 | focus(c); |
| 233 | lt->arrange(); | 233 | arrange(); |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | void | 236 | void |
| 237 | resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | 237 | resize(Client *c, int x, int y, int w, int h, Bool sizehints) { |
| 238 | double dx, dy, max, min, ratio; | 238 | double dx, dy, max, min, ratio; |
| 239 | XWindowChanges wc; | 239 | XWindowChanges wc; |
| 240 | |||
| 240 | if(sizehints) { | 241 | if(sizehints) { |
| 241 | if(c->minay > 0 && c->maxay > 0 && (h - c->baseh) > 0 && (w - c->basew) > 0) { | 242 | if(c->minay > 0 && c->maxay > 0 && (h - c->baseh) > 0 && (w - c->basew) > 0) { |
| 242 | dx = (double)(w - c->basew); | 243 | dx = (double)(w - c->basew); |
| @@ -297,12 +298,12 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { | |||
| 297 | 298 | ||
| 298 | void | 299 | void |
| 299 | togglefloating(const char *arg) { | 300 | togglefloating(const char *arg) { |
| 300 | if(!sel || lt->arrange == floating) | 301 | if(!sel || isfloating()) |
| 301 | return; | 302 | return; |
| 302 | sel->isfloating = !sel->isfloating; | 303 | sel->isfloating = !sel->isfloating; |
| 303 | if(sel->isfloating) | 304 | if(sel->isfloating) |
| 304 | resize(sel, sel->x, sel->y, sel->w, sel->h, True); | 305 | resize(sel, sel->x, sel->y, sel->w, sel->h, True); |
| 305 | lt->arrange(); | 306 | arrange(); |
| 306 | } | 307 | } |
| 307 | 308 | ||
| 308 | void | 309 | void |
| @@ -334,7 +335,7 @@ unmanage(Client *c) { | |||
| 334 | XSync(dpy, False); | 335 | XSync(dpy, False); |
| 335 | XSetErrorHandler(xerror); | 336 | XSetErrorHandler(xerror); |
| 336 | XUngrabServer(dpy); | 337 | XUngrabServer(dpy); |
| 337 | lt->arrange(); | 338 | arrange(); |
| 338 | } | 339 | } |
| 339 | 340 | ||
| 340 | void | 341 | void |
