dwm

my dwm build
Log | Files | Refs | LICENSE

commit 1140994f4429ac5f13b103ac55e312e5414c03e3
parent 0c0de9ee8dd2d7ac7f79e26415b5a73790d7d2ac
Author: ssnf <ssnf@ssnf.xyz>
Date:   Wed, 19 Oct 2022 11:26:26 +0000

cursorwarp patch

Diffstat:
Mdwm.c | 3+++
Apatches/dwm-cursorwarp-20210222-61bb8b2.diff | 33+++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -1058,6 +1058,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 @@ -1086,6 +1088,7 @@ focusstack(const Arg* arg) if (c != NULL) { focus(c); restack(selmon); + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2); } } diff --git a/patches/dwm-cursorwarp-20210222-61bb8b2.diff b/patches/dwm-cursorwarp-20210222-61bb8b2.diff @@ -0,0 +1,33 @@ +From 1e4936416fa5517fe447e3388e1d44c913e29f56 Mon Sep 17 00:00:00 2001 +From: Markus Dam <markus.dam123@gmail.com> +Date: Mon, 22 Feb 2021 13:40:13 +0100 +Subject: [PATCH] Add cursor warping + +--- + dwm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/dwm.c b/dwm.c +index 331a309..c80ef8a 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -882,6 +882,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 +@@ -906,6 +908,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); + } + } + +-- +2.30.1 +