commit da0b9eb6c98288e7f9455352a78ba30d4b8b17f5 from: Hiltjo Posthuma date: Sat Nov 7 11:43:00 2015 UTC fix: multimon: always spawn client on first monitor if specified with -m 0 This was always broken. Reproduce: focus client on second monitor, spawn dmenu with -m 0. Result: Old wrong behaviour: dmenu spawns on second monitor (focused client). Now: dmenu spawns on specified monitor (first). commit - 44b242c76359e21b97418675f253d45feb7c04e0 commit + da0b9eb6c98288e7f9455352a78ba30d4b8b17f5 blob - 1c2e780efc766af060145563efa23c47fbda01ca blob + 6308fa9a10294cd4e04724f469a2b3deb18ea05a --- dmenu.c +++ dmenu.c @@ -552,7 +552,7 @@ setup(void) XGetInputFocus(dpy, &w, &di); if (mon != -1 && mon < n) i = mon; - if (!i && w != root && w != PointerRoot && w != None) { + else if (w != root && w != PointerRoot && w != None) { /* find top-level window containing current input focus */ do { if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws)