add cursorwarp patch

This commit is contained in:
randomuser 2022-05-17 21:17:17 -05:00
parent abb16b8c15
commit 5a3d9e2fad
1 changed files with 3 additions and 0 deletions

3
dwm.c
View File

@ -834,6 +834,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
@ -859,6 +861,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);
}
}