fix: multimon: always spawn client on first monitor if specified with -m 0 da0b9eb6
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).
Hiltjo Posthuma · 2015-11-07 12:43 1 file(s) · +1 −1
dmenu.c +1 −1
552 552
		XGetInputFocus(dpy, &w, &di);
553 553
		if (mon != -1 && mon < n)
554 554
			i = mon;
555 -
		if (!i && w != root && w != PointerRoot && w != None) {
555 +
		else if (w != root && w != PointerRoot && w != None) {
556 556
			/* find top-level window containing current input focus */
557 557
			do {
558 558
				if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws)