Applied cursorwarp patch for multimonitor.

This commit is contained in:
Sheldon Lee
2021-12-21 16:44:08 +08:00
parent 86099dc671
commit 27666c8a81
2 changed files with 36 additions and 0 deletions
+3
View File
@@ -866,6 +866,8 @@ focusmon(const Arg *arg)
unfocus(selmon->sel, 0);
selmon = m;
focus(NULL);
if (selmon->sel)
XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
}
void
@@ -891,6 +893,7 @@ focusstack(const Arg *arg)
if (c) {
focus(c);
restack(selmon);
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
}
}