]> nyquistdev.net Git - dwm-config.git/commitdiff
launch applications, switch to, and warp pointer
authorA-Larsen <austin.larsen@mailfence.com>
Tue, 13 Oct 2026 03:55:47 +0000 (23:55 -0400)
committerA-Larsen <austin.larsen@mailfence.com>
Tue, 13 Oct 2026 03:55:47 +0000 (23:55 -0400)
dwm
dwm.c
dwm.o

diff --git a/dwm b/dwm
index 6eb49b0a3d16b1fb011d19b7d48b6db6323f3911..7fee6f551b32b1451aea0050746eee0bd212596f 100755 (executable)
Binary files a/dwm and b/dwm differ
diff --git a/dwm.c b/dwm.c
index da8bafc6b4052763615a1796aa6ef23b6927aac3..b093df847ac55bfd7d67e9664bed2a1388ea58d8 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -2318,6 +2318,10 @@ manage(Window w, XWindowAttributes *wa)
         if (c->explicit_tags && !(c->tags & selmon->tagset[selmon->seltags])) {
             view(&(Arg){ .ui = c->tags });
         }
+        /* Warp mouse to the center of the target monitor */
+        XWarpPointer(dpy, None, root, 0, 0, 0, 0,
+                     c->mon->wx + c->mon->ww / 2,
+                     c->mon->wy + c->mon->wh / 2);
     }
     /* --------------------------------------------- */
 
diff --git a/dwm.o b/dwm.o
index b327e60b5c8ffe515482749232f07ea380221838..4bcac9d30392a3b4bb6f43fa76f12916aee37413 100644 (file)
Binary files a/dwm.o and b/dwm.o differ