diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-11-07 12:43:00 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-11-07 12:43:00 +0100 |
commit | da0b9eb6c98288e7f9455352a78ba30d4b8b17f5 (patch) | |
tree | 23355a0001fedcd23b29c5187f095ad167b270cf | |
parent | 44b242c76359e21b97418675f253d45feb7c04e0 (diff) |
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).
-rw-r--r-- | dmenu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -552,7 +552,7 @@ setup(void) | |||
552 | XGetInputFocus(dpy, &w, &di); | 552 | XGetInputFocus(dpy, &w, &di); |
553 | if (mon != -1 && mon < n) | 553 | if (mon != -1 && mon < n) |
554 | i = mon; | 554 | i = mon; |
555 | if (!i && w != root && w != PointerRoot && w != None) { | 555 | else if (w != root && w != PointerRoot && w != None) { |
556 | /* find top-level window containing current input focus */ | 556 | /* find top-level window containing current input focus */ |
557 | do { | 557 | do { |
558 | if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws) | 558 | if (XQueryTree(dpy, (pw = w), &dw, &w, &dws, &du) && dws) |