diff options
author | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-14 10:18:24 +0200 |
---|---|---|
committer | Anselm R.Garbe <arg@10ksloc.org> | 2006-08-14 10:18:24 +0200 |
commit | d4b7a9a3735deeab639f28b5bb2f568e0dc49616 (patch) | |
tree | 9cff17d7a5d4fa2fe94b39d0d18d8d72c8429736 /client.c | |
parent | 4d67199a4bb68e5377d2fece62a83fde66c92861 (diff) | |
download | dwm-d4b7a9a3735deeab639f28b5bb2f568e0dc49616.tar.gz |
implemented restack behavior (floats are on top in tiled mode)
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/client.c b/client.c index 5be438e..ecfd8f0 100644 --- a/client.c +++ b/client.c @@ -59,8 +59,6 @@ focus(Client *c) drawtitle(old); drawtitle(c); XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); - XSync(dpy, False); - while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void @@ -77,8 +75,8 @@ focusnext(Arg *arg) if(!(c = getnext(sel->next))) c = getnext(clients); if(c) { - higher(c); focus(c); + restack(); } } @@ -98,8 +96,8 @@ focusprev(Arg *arg) c = getprev(c); } if(c) { - higher(c); focus(c); + restack(); } } @@ -181,13 +179,6 @@ gravitate(Client *c, Bool invert) } void -higher(Client *c) -{ - XRaiseWindow(dpy, c->win); - XRaiseWindow(dpy, c->title); -} - -void killclient(Arg *arg) { if(!sel) @@ -271,13 +262,12 @@ manage(Window w, XWindowAttributes *wa) || (c->maxw && c->minw && c->maxw == c->minw && c->maxh == c->minh); settitle(c); - arrange(NULL); - /* mapping the window now prevents flicker */ - XMapRaised(dpy, c->win); - XMapRaised(dpy, c->title); + XMapWindow(dpy, c->win); + XMapWindow(dpy, c->title); if(isvisible(c)) focus(c); + arrange(NULL); } void @@ -410,7 +400,7 @@ togglemax(Arg *arg) sel->w = sw - 2; sel->h = sh - 2 - bh; - higher(sel); + restack(); resize(sel, arrange == dofloat, TopLeft); sel->x = ox; @@ -446,9 +436,9 @@ unmanage(Client *c) XSync(dpy, False); XSetErrorHandler(xerror); XUngrabServer(dpy); - arrange(NULL); if(sel) focus(sel); + arrange(NULL); } void @@ -474,6 +464,6 @@ zoom(Arg *arg) clients->prev = sel; sel->next = clients; clients = sel; - arrange(NULL); focus(sel); + arrange(NULL); } |