Xinqi Bao's Git
projects
/
dmenu.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
lsx: detect read errors
[dmenu.git]
/
dmenu.c
diff --git
a/dmenu.c
b/dmenu.c
index
458f5ab
..
f105b56
100644
(file)
--- a/
dmenu.c
+++ b/
dmenu.c
@@
-454,6
+454,7
@@
readstdin(void) {
if(items)
items[i].text = NULL;
inputw = maxstr ? textw(dc, maxstr) : 0;
if(items)
items[i].text = NULL;
inputw = maxstr ? textw(dc, maxstr) : 0;
+ lines = MIN(lines, i);
}
void
}
void
@@
-510,7
+511,7
@@
setup(void) {
XGetInputFocus(dc->dpy, &w, &di);
if(w != root && w != PointerRoot && w != None && XGetWindowAttributes(dc->dpy, w, &wa))
XGetInputFocus(dc->dpy, &w, &di);
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,
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++)
else
XQueryPointer(dc->dpy, root, &dw, &dw, &x, &y, &di, &di, &du);
for(i = 0; i < n-1; i++)