if(items)
items[i].text = NULL;
inputw = maxstr ? textw(dc, maxstr) : 0;
+ lines = MIN(lines, i);
}
void
XWindowAttributes wa;
XGetInputFocus(dc->dpy, &w, &di);
- if(w != root && XGetWindowAttributes(dc->dpy, w, &wa))
- XTranslateCoordinates(dc->dpy, root, root, wa.x, wa.y, &x, &y, &dw);
+ if(w != root && w != PointerRoot && w != None && XGetWindowAttributes(dc->dpy, w, &wa))
+ XTranslateCoordinates(dc->dpy, w, root, wa.x, wa.y, &x, &y, &dw);
else
XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du);
for(i = 0; i < n-1; i++)