[hackers] [dmenu] fix: multimon: always spawn client on first monitor if specified with -m 0 || Hiltjo Posthuma
commit da0b9eb6c98288e7f9455352a78ba30d4b8b17f5
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Sat Nov 7 12:43:00 2015 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sat Nov 7 12:43:00 2015 +0100
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).
diff --git a/dmenu.c b/dmenu.c
index 1c2e780..6308fa9 100644
--- a/dmenu.c
+++ b/dmenu.c
_AT_@ -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)
Received on Sat Nov 07 2015 - 12:53:35 CET
This archive was generated by hypermail 2.3.0
: Sat Nov 07 2015 - 13:00:14 CET