X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=client.c;h=d180278f3604436f9f25d9f7499122e5cf5cdac7;hb=0ea0343a631b62f2a9d9c5b279d3e368ec47c28a;hp=c962c390b809c352ed69872a311a7395cd5eb040;hpb=29c26b88e7333fb8ea022c4bb4277bc0394ab9e3;p=dwm.git diff --git a/client.c b/client.c index c962c39..d180278 100644 --- a/client.c +++ b/client.c @@ -83,24 +83,6 @@ setclientstate(Client *c, long state) { PropModeReplace, (unsigned char *)data, 2); } -static void -togglemax(Client *c) { - XEvent ev; - - if(c->isfixed) - return; - if((c->ismax = !c->ismax)) { - c->rx = c->x; - c->ry = c->y; - c->rw = c->w; - c->rh = c->h; - resize(c, wax, way, waw - 2 * BORDERPX, wah - 2 * BORDERPX, True); - } - else - resize(c, c->rx, c->ry, c->rw, c->rh, True); - while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); -} - static int xerrordummy(Display *dsply, XErrorEvent *ee) { return 0; @@ -171,7 +153,7 @@ focus(Client *c) { } void -killclient(Arg *arg) { +killclient(const char *arg) { if(!sel) return; if(isprotodel(sel)) @@ -221,8 +203,8 @@ manage(Window w, XWindowAttributes *wa) { updatetitle(c); for(t = clients; t && t->win != trans; t = t->next); settags(c, t); - if(!c->isversatile) - c->isversatile = (t != NULL) || c->isfixed; + if(!c->isfloating) + c->isfloating = (t != NULL) || c->isfixed; attach(c); attachstack(c); c->isbanned = True; @@ -303,10 +285,10 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { } void -toggleversatile(Arg *arg) { - if(!sel || lt->arrange == versatile) +togglefloating(const char *arg) { + if(!sel || lt->arrange == floating) return; - sel->isversatile = !sel->isversatile; + sel->isfloating = !sel->isfloating; lt->arrange(); } @@ -402,25 +384,3 @@ unmanage(Client *c) { XUngrabServer(dpy); lt->arrange(); } - -void -zoom(Arg *arg) { - unsigned int n; - Client *c; - - if(!sel) - return; - if(sel->isversatile || (lt->arrange == versatile)) { - togglemax(sel); - return; - } - for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) - n++; - if((c = sel) == nexttiled(clients)) - if(!(c = nexttiled(c->next))) - return; - detach(c); - attach(c); - focus(c); - lt->arrange(); -}