-void
-togglemax(Arg *arg) {
- int ox, oy, ow, oh;
- Client *c;
- XEvent ev;
-
- if(!sel)
- return;
-
- if((maximized = !maximized)) {
- ox = sel->x;
- oy = sel->y;
- ow = sel->w;
- oh = sel->h;
- sel->x = sx;
- sel->y = sy + bh;
- sel->w = sw - 2;
- sel->h = sh - 2 - bh;
-
- restack();
- for(c = getnext(clients); c; c = getnext(c->next))
- if(c != sel)
- ban(c);
- resize(sel, arrange == dofloat, TopLeft);
-
- sel->x = ox;
- sel->y = oy;
- sel->w = ow;
- sel->h = oh;
- }
- else
- arrange(NULL);
- while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
-}
-