git.strcat.st

/strcat/wm.git/ - summarytreelogarchivereleases

subject
snap cursor to bottom right of window when resizing
commit
32783a08af3be6a632d6f525b1525add39fc0bba
date
2026-04-20T19:03:00Z
message
diff
 wm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/wm.c b/wm.c
index f0fbc4c..e5091e7 100644
--- a/wm.c
+++ b/wm.c
@@ -39,6 +39,12 @@ main(void)
 	            GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
 	        XGetWindowAttributes(dpy, dragwin, &attr);
 	        start = ev.xbutton;
+	        if (start.button == 3) {
+	            start.x_root = attr.x + attr.width - 1;
+	            start.y_root = attr.y + attr.height - 1;
+	            XWarpPointer(dpy, None, root, 0, 0, 0, 0,
+	                start.x_root, start.y_root);
+	        }
 	        dragging = 1;
 	    } else if (ev.type == MotionNotify && dragging) {
 	        int xdiff, ydiff;