summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/client.c b/client.c
index 725f70b..2f1e2b3 100644
--- a/client.c
+++ b/client.c
@@ -89,8 +89,6 @@ focus(Client *c) {
89 if(!sel) 89 if(!sel)
90 sel = c; 90 sel = c;
91 else if(sel != c) { 91 else if(sel != c) {
92 if(maximized)
93 togglemax(NULL);
94 old = sel; 92 old = sel;
95 sel = c; 93 sel = c;
96 if(old) { 94 if(old) {
@@ -208,6 +206,10 @@ manage(Window w, XWindowAttributes *wa) {
208 c->w = c->tw = wa->width; 206 c->w = c->tw = wa->width;
209 c->h = wa->height; 207 c->h = wa->height;
210 c->th = bh; 208 c->th = bh;
209 c->rx = sx;
210 c->ry = bh;
211 c->rw = sw;
212 c->rh = sh - bh;
211 213
212 c->border = 0; 214 c->border = 0;
213 updatesize(c); 215 updatesize(c);
@@ -370,41 +372,6 @@ updatetitle(Client *c) {
370} 372}
371 373
372void 374void
373togglemax(Arg *arg) {
374 int ox, oy, ow, oh;
375 Client *c;
376 XEvent ev;
377
378 if(!sel)
379 return;
380
381 if((maximized = !maximized)) {
382 ox = sel->x;
383 oy = sel->y;
384 ow = sel->w;
385 oh = sel->h;
386 sel->x = sx;
387 sel->y = sy + bh;
388 sel->w = sw - 2;
389 sel->h = sh - 2 - bh;
390
391 restack();
392 for(c = getnext(clients); c; c = getnext(c->next))
393 if(c != sel)
394 ban(c);
395 resize(sel, arrange == dofloat, TopLeft);
396
397 sel->x = ox;
398 sel->y = oy;
399 sel->w = ow;
400 sel->h = oh;
401 }
402 else
403 arrange(NULL);
404 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
405}
406
407void
408unmanage(Client *c) { 375unmanage(Client *c) {
409 Client *nc; 376 Client *nc;
410 377