diff options
author | anselm@garbe.us <unknown> | 2012-03-25 17:46:03 +0200 |
---|---|---|
committer | anselm@garbe.us <unknown> | 2012-03-25 17:46:03 +0200 |
commit | c1128417a991258b2382a76ec4529b213ee15c91 (patch) | |
tree | 6e0b8f8f805ab18438de2727b9f6fc9af8bd707c | |
parent | 1b62f8fa58eba3e535134912da2fa305fb7d3021 (diff) | |
download | dwm-c1128417a991258b2382a76ec4529b213ee15c91.tar.gz dwm-c1128417a991258b2382a76ec4529b213ee15c91.tar.bz2 dwm-c1128417a991258b2382a76ec4529b213ee15c91.zip |
applied Andreas Amann's netwm_active_window patch, thx
-rw-r--r-- | dwm.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -499,6 +499,7 @@ cleanup(void) { cleanupmon(mons); XSync(dpy, False); XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); + XDeleteProperty(dpy, root, netatom[NetActiveWindow]); } void @@ -858,8 +859,10 @@ focus(Client *c) { XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); setfocus(c); } - else + else { XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + XDeleteProperty(dpy, root, netatom[NetActiveWindow]); + } selmon->sel = c; drawbars(); } @@ -1527,8 +1530,12 @@ sendevent(Client *c, Atom proto) { void setfocus(Client *c) { - if(!c->neverfocus) + if(!c->neverfocus) { XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); + XChangeProperty(dpy, root, netatom[NetActiveWindow], + XA_WINDOW, 32, PropModeReplace, + (unsigned char *) &(c->win), 1); + } sendevent(c, wmatom[WMTakeFocus]); } @@ -1786,8 +1793,10 @@ unfocus(Client *c, Bool setfocus) { return; grabbuttons(c, False); XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); - if(setfocus) + if(setfocus) { XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + XDeleteProperty(dpy, root, netatom[NetActiveWindow]); + } } void |