From 3e7db78a19e50c7d629c5d1bc677cc386f32d2e7 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Wed, 5 Oct 2022 18:49:51 -0600 Subject: cursor warp --- dwm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index e5c8b27..e4f75a7 100644 --- a/dwm.c +++ b/dwm.c @@ -837,6 +837,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 @@ -862,6 +864,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); } } -- cgit v1.2.3