[hackers] [dwm] applied Andreas Amann's netwm_active_window patch, thx || anselm
changeset: 1598:b3a37808454d
user: anselm_AT_garbe.us
date: Sun Mar 25 17:46:03 2012 +0200
files: dwm.c
description:
applied Andreas Amann's netwm_active_window patch, thx
diff -r ba5be5b023e1 -r b3a37808454d dwm.c
--- a/dwm.c Sat Mar 17 18:14:17 2012 +0100
+++ b/dwm.c Sun Mar 25 17:46:03 2012 +0200
_AT_@ -499,6 +499,7 @@
cleanupmon(mons);
XSync(dpy, False);
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
+ XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
}
void
_AT_@ -858,8 +859,10 @@
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();
}
_AT_@ -1527,8 +1530,12 @@
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]);
}
_AT_@ -1786,8 +1793,10 @@
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
Received on Sun Mar 25 2012 - 17:49:37 CEST
This archive was generated by hypermail 2.3.0
: Sun Mar 25 2012 - 18:00:09 CEST