]> git.armaanb.net Git - dmenu.git/commitdiff
Fix regression in 84a1bc5
authorHiltjo Posthuma <hiltjo@codemadness.org>
Thu, 4 Jan 2018 22:45:49 +0000 (23:45 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Thu, 4 Jan 2018 22:45:49 +0000 (23:45 +0100)
Reported by Jochen Sprickerhof, thanks!

Applied patch with minor change (only initialize `i` for XINERAMA).

dmenu.c

diff --git a/dmenu.c b/dmenu.c
index 3c261c0b0a8131680e0e8bde1b022ee108cf0d0a..a2461115ec253a051d2f3438890eb7944ffe2ccf 100644 (file)
--- a/dmenu.c
+++ b/dmenu.c
@@ -541,7 +541,7 @@ run(void)
 static void
 setup(void)
 {
-       int x, y, i, j = 0;
+       int x, y, i, j;
        unsigned int du;
        XSetWindowAttributes swa;
        XIM xim;
@@ -565,6 +565,7 @@ setup(void)
        lines = MAX(lines, 0);
        mh = (lines + 1) * bh;
 #ifdef XINERAMA
+       i = 0;
        if (parentwin == root && (info = XineramaQueryScreens(dpy, &n))) {
                XGetInputFocus(dpy, &w, &di);
                if (mon >= 0 && mon < n)