228 attachstack(c); |
228 attachstack(c); |
229 XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); /* some windows require this */ |
229 XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); /* some windows require this */ |
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); |
243 dy = (double)(h - c->baseh); |
244 dy = (double)(h - c->baseh); |
244 min = (double)(c->minax) / (double)(c->minay); |
245 min = (double)(c->minax) / (double)(c->minay); |
295 } |
296 } |
296 } |
297 } |
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 |
309 unban(Client *c) { |
310 unban(Client *c) { |
310 if(!c->isbanned) |
311 if(!c->isbanned) |