dwm-meillo
diff view.c @ 400:052657ff2e7b
applied Sanders max_and_focus.patch
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Mon, 04 Sep 2006 08:55:49 +0200 |
parents | cb8a231610c7 |
children | 1eb2eb405653 |
line diff
1.1 --- a/view.c Fri Sep 01 15:31:59 2006 +0200 1.2 +++ b/view.c Mon Sep 04 08:55:49 2006 +0200 1.3 @@ -57,22 +57,20 @@ 1.4 void 1.5 dofloat(Arg *arg) 1.6 { 1.7 - Client *c; 1.8 + Client *c, *fc; 1.9 + 1.10 + maximized = False; 1.11 1.12 for(c = clients; c; c = c->next) { 1.13 - c->ismax = False; 1.14 if(isvisible(c)) { 1.15 resize(c, True, TopLeft); 1.16 } 1.17 else 1.18 ban(c); 1.19 } 1.20 - if(!sel || !isvisible(sel)) 1.21 - sel = getnext(clients); 1.22 - if(sel) 1.23 - focus(sel); 1.24 - else 1.25 - XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); 1.26 + if(!(fc = sel) || !isvisible(fc)) 1.27 + fc = getnext(clients); 1.28 + focus(fc); 1.29 restack(); 1.30 } 1.31 1.32 @@ -80,7 +78,9 @@ 1.33 dotile(Arg *arg) 1.34 { 1.35 int h, i, n, w; 1.36 - Client *c; 1.37 + Client *c, *fc; 1.38 + 1.39 + maximized = False; 1.40 1.41 w = sw - mw; 1.42 for(n = 0, c = clients; c; c = c->next) 1.43 @@ -93,7 +93,6 @@ 1.44 h = sh - bh; 1.45 1.46 for(i = 0, c = clients; c; c = c->next) { 1.47 - c->ismax = False; 1.48 if(isvisible(c)) { 1.49 if(c->isfloat) { 1.50 resize(c, True, TopLeft); 1.51 @@ -132,12 +131,9 @@ 1.52 else 1.53 ban(c); 1.54 } 1.55 - if(!sel || !isvisible(sel)) 1.56 - sel = getnext(clients); 1.57 - if(sel) 1.58 - focus(sel); 1.59 - else 1.60 - XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); 1.61 + if(!(fc = sel) || !isvisible(fc)) 1.62 + fc = getnext(clients); 1.63 + focus(fc); 1.64 restack(); 1.65 } 1.66 1.67 @@ -289,7 +285,7 @@ 1.68 { 1.69 Client *c = sel; 1.70 1.71 - if(!c || (arrange != dotile) || c->isfloat || c->ismax) 1.72 + if(!c || (arrange != dotile) || c->isfloat || maximized) 1.73 return; 1.74 1.75 if(c == getnext(clients))