summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/client.c b/client.c
index 915a890..114aedd 100644
--- a/client.c
+++ b/client.c
@@ -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
236void 236void
237resize(Client *c, int x, int y, int w, int h, Bool sizehints) { 237resize(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
298void 299void
299togglefloating(const char *arg) { 300togglefloating(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
308void 309void
@@ -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
340void 341void