X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=client.c;h=22408f2ebe239593777a3a014d5b5ea064064eca;hb=feec92df8449f14836b8681f4e56f2afeea4faf6;hp=114aeddc6328d0320593ab82dd198ece49f59ab7;hpb=77044e876511f51c34bde379d89e2de754707ee6;p=dwm.git diff --git a/client.c b/client.c index 114aedd..22408f2 100644 --- a/client.c +++ b/client.c @@ -272,9 +272,9 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { w -= (w - c->basew) % c->incw; if(c->inch) h -= (h - c->baseh) % c->inch; - if(w <= 0 || h <= 0) - return; } + if(w <= 0 || h <= 0) + return; /* offscreen appearance fixes */ if(x > sw) x = sw - w - 2 * c->border; @@ -296,16 +296,6 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { } } -void -togglefloating(const char *arg) { - if(!sel || isfloating()) - return; - sel->isfloating = !sel->isfloating; - if(sel->isfloating) - resize(sel, sel->x, sel->y, sel->w, sel->h, True); - arrange(); -} - void unban(Client *c) { if(!c->isbanned) @@ -316,7 +306,7 @@ unban(Client *c) { } void -unmanage(Client *c) { +unmanage(Client *c, long state) { XWindowChanges wc; wc.border_width = c->oldborder; @@ -329,7 +319,7 @@ unmanage(Client *c) { if(sel == c) focus(NULL); XUngrabButton(dpy, AnyButton, AnyModifier, c->win); - setclientstate(c, WithdrawnState); + setclientstate(c, state); free(c->tags); free(c); XSync(dpy, False);