[hackers] [dmenu] Fix regression in 84a1bc5 || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Thu, 4 Jan 2018 23:47:46 +0100 (CET)

commit 889512811d7ae410eb4ab60be3568278b3e23f2e
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Thu Jan 4 23:45:49 2018 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Thu Jan 4 23:45:49 2018 +0100

    Fix regression in 84a1bc5
    
    Reported by Jochen Sprickerhof, thanks!
    
    Applied patch with minor change (only initialize `i` for XINERAMA).

diff --git a/dmenu.c b/dmenu.c
index 3c261c0..a246111 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -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;
_AT_@ -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)
Received on Thu Jan 04 2018 - 23:47:46 CET

This archive was generated by hypermail 2.3.0 : Thu Jan 04 2018 - 23:48:25 CET