prevent focus on unfocused monitor
@@ -2582,6 +2582,7 @@ movemouse(const Arg *arg)
if ((m = recttomon(ev.xmotion.x_root, ev.xmotion.y_root, 2, 2)) != selmon) {
XRaiseWindow(dpy, c->win);
sendmon(c, m);
+ unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
drawbar(selmon);
@@ -2694,6 +2695,7 @@ movemouse(const Arg *arg)
XUngrabPointer(dpy, CurrentTime);
if (!tagclient && (m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
sendmon(c, m);
+ unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
}
@@ -3140,6 +3142,7 @@ void drawwindow(const Arg *arg) {
(abs(c->w - width) > 20 || abs(c->h - height) > 20 || abs(c->x - x) > 20 || abs(c->y - y) > 20)) {
if ((m = recttomon(x, y, width, height)) != selmon) {
sendmon(c, m);
+ unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
}
@@ -3548,6 +3551,7 @@ resizemouse(const Arg *arg)
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
sendmon(c, m);
+ unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
}
@@ -3640,6 +3644,7 @@ resizeaspectmouse(const Arg *arg)
if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
sendmon(c, m);
+ unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
}
