X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=client.c;h=c962c390b809c352ed69872a311a7395cd5eb040;hb=78666b99b8dedb57f1dea53931a334c151dea865;hp=2aa1955d4a2591500de12dacf07f27a685c580da;hpb=6d5f67a0922d40d52290c12f9c0d937f4121406e;p=dwm.git diff --git a/client.c b/client.c index 2aa1955..c962c39 100644 --- a/client.c +++ b/client.c @@ -171,38 +171,6 @@ focus(Client *c) { } void -focusnext(Arg *arg) { - Client *c; - - if(!sel) - return; - for(c = sel->next; c && !isvisible(c); c = c->next); - if(!c) - for(c = clients; c && !isvisible(c); c = c->next); - if(c) { - focus(c); - restack(); - } -} - -void -focusprev(Arg *arg) { - Client *c; - - if(!sel) - return; - for(c = sel->prev; c && !isvisible(c); c = c->prev); - if(!c) { - for(c = clients; c && c->next; c = c->next); - for(; c && !isvisible(c); c = c->prev); - } - if(c) { - focus(c); - restack(); - } -} - -void killclient(Arg *arg) { if(!sel) return; @@ -253,8 +221,8 @@ manage(Window w, XWindowAttributes *wa) { updatetitle(c); for(t = clients; t && t->win != trans; t = t->next); settags(c, t); - if(!c->versatile) - c->versatile = (t != NULL) || c->isfixed; + if(!c->isversatile) + c->isversatile = (t != NULL) || c->isfixed; attach(c); attachstack(c); c->isbanned = True; @@ -266,12 +234,6 @@ manage(Window w, XWindowAttributes *wa) { lt->arrange(); } -Client * -nexttiled(Client *c) { - for(; c && (c->versatile || !isvisible(c)); c = c->next); - return c; -} - void resize(Client *c, int x, int y, int w, int h, Bool sizehints) { float actual, dx, dy, max, min; @@ -341,6 +303,14 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehints) { } void +toggleversatile(Arg *arg) { + if(!sel || lt->arrange == versatile) + return; + sel->isversatile = !sel->isversatile; + lt->arrange(); +} + +void updatesizehints(Client *c) { long msize; XSizeHints size; @@ -440,7 +410,7 @@ zoom(Arg *arg) { if(!sel) return; - if(sel->versatile || (lt->arrange == versatile)) { + if(sel->isversatile || (lt->arrange == versatile)) { togglemax(sel); return; }