aewl
diff client.c @ 270:dacd3f3c5823
implemented restack behavior (floats are on top in tiled mode)
author | Anselm R.Garbe <arg@10ksloc.org> |
---|---|
date | Mon, 14 Aug 2006 10:18:24 +0200 |
parents | d6fd632d861c |
children | be40a56df248 |
line diff
1.1 --- a/client.c Mon Aug 14 08:52:15 2006 +0200 1.2 +++ b/client.c Mon Aug 14 10:18:24 2006 +0200 1.3 @@ -59,8 +59,6 @@ 1.4 drawtitle(old); 1.5 drawtitle(c); 1.6 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); 1.7 - XSync(dpy, False); 1.8 - while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); 1.9 } 1.10 1.11 void 1.12 @@ -77,8 +75,8 @@ 1.13 if(!(c = getnext(sel->next))) 1.14 c = getnext(clients); 1.15 if(c) { 1.16 - higher(c); 1.17 focus(c); 1.18 + restack(); 1.19 } 1.20 } 1.21 1.22 @@ -98,8 +96,8 @@ 1.23 c = getprev(c); 1.24 } 1.25 if(c) { 1.26 - higher(c); 1.27 focus(c); 1.28 + restack(); 1.29 } 1.30 } 1.31 1.32 @@ -181,13 +179,6 @@ 1.33 } 1.34 1.35 void 1.36 -higher(Client *c) 1.37 -{ 1.38 - XRaiseWindow(dpy, c->win); 1.39 - XRaiseWindow(dpy, c->title); 1.40 -} 1.41 - 1.42 -void 1.43 killclient(Arg *arg) 1.44 { 1.45 if(!sel) 1.46 @@ -271,13 +262,12 @@ 1.47 || (c->maxw && c->minw && 1.48 c->maxw == c->minw && c->maxh == c->minh); 1.49 settitle(c); 1.50 - arrange(NULL); 1.51 1.52 - /* mapping the window now prevents flicker */ 1.53 - XMapRaised(dpy, c->win); 1.54 - XMapRaised(dpy, c->title); 1.55 + XMapWindow(dpy, c->win); 1.56 + XMapWindow(dpy, c->title); 1.57 if(isvisible(c)) 1.58 focus(c); 1.59 + arrange(NULL); 1.60 } 1.61 1.62 void 1.63 @@ -410,7 +400,7 @@ 1.64 sel->w = sw - 2; 1.65 sel->h = sh - 2 - bh; 1.66 1.67 - higher(sel); 1.68 + restack(); 1.69 resize(sel, arrange == dofloat, TopLeft); 1.70 1.71 sel->x = ox; 1.72 @@ -446,9 +436,9 @@ 1.73 XSync(dpy, False); 1.74 XSetErrorHandler(xerror); 1.75 XUngrabServer(dpy); 1.76 - arrange(NULL); 1.77 if(sel) 1.78 focus(sel); 1.79 + arrange(NULL); 1.80 } 1.81 1.82 void 1.83 @@ -474,6 +464,6 @@ 1.84 clients->prev = sel; 1.85 sel->next = clients; 1.86 clients = sel; 1.87 + focus(sel); 1.88 arrange(NULL); 1.89 - focus(sel); 1.90 }