Introduction
Introduction Statistics Contact Development Disclaimer Help
fix crash if negative monitor (< -1) was passed - dmenu - dynamic menu
git clone git://git.suckless.org/dmenu
Log
Files
Refs
README
LICENSE
---
commit d14670b9959f8b3760b63dd40a70687a90312b8a
parent aa92cd68bdff95c181cc854043598e6c6007d45e
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 26 Jul 2016 23:13:06 +0200
fix crash if negative monitor (< -1) was passed
for example: dmenu -m '-9001'
Diffstat:
M dmenu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/dmenu.c b/dmenu.c
@@ -541,7 +541,7 @@ setup(void)
#ifdef XINERAMA
if ((info = XineramaQueryScreens(dpy, &n))) {
XGetInputFocus(dpy, &w, &di);
- if (mon != -1 && mon < n)
+ if (mon >= 0 && mon < n)
i = mon;
else if (w != root && w != PointerRoot && w != None) {
/* find top-level window containing current input focu…
@@ -558,7 +558,7 @@ setup(void)
}
}
/* no focused window is on screen, so use pointer location ins…
- if (mon == -1 && !area && XQueryPointer(dpy, root, &dw, &dw, &…
+ if (mon < 0 && !area && XQueryPointer(dpy, root, &dw, &dw, &x,…
for (i = 0; i < n; i++)
if (INTERSECT(x, y, 1, 1, info[i]))
break;
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.