1
0
Fork 0

fix monitor select when no focus

This commit is contained in:
Connor Lane Smith 2011-09-30 21:08:37 +01:00
parent 5020734408
commit e30ad490b2

View file

@ -509,7 +509,7 @@ setup(void) {
XWindowAttributes wa; XWindowAttributes wa;
XGetInputFocus(dc->dpy, &w, &di); XGetInputFocus(dc->dpy, &w, &di);
if(w != root && XGetWindowAttributes(dc->dpy, w, &wa)) if(w != root && w != PointerRoot && w != None && XGetWindowAttributes(dc->dpy, w, &wa))
XTranslateCoordinates(dc->dpy, root, root, wa.x, wa.y, &x, &y, &dw); XTranslateCoordinates(dc->dpy, root, root, wa.x, wa.y, &x, &y, &dw);
else else
XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du); XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du);