From 3d0629b6647bedc92590e09ab8b02f7ccb8faf1e Mon Sep 17 00:00:00 2001 From: Jakub Date: Wed, 15 May 2024 06:33:30 -0400 Subject: [PATCH] have drag m fact live redraw --- dwm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dwm.c b/dwm.c index e0799d9..1cf9a23 100644 --- a/dwm.c +++ b/dwm.c @@ -1713,6 +1713,10 @@ resizemouse(const Arg *arg) if (!selmon->lt[selmon->sellt]->arrange || c->isfloating) resize(c, c->x, c->y, nw, nh, 1); + else { + selmon->mfact = (double) (ev.xmotion.x_root - selmon->mx) / (double) selmon->ww; + arrange(selmon); + } break; } } while (ev.type != ButtonRelease); @@ -1720,8 +1724,6 @@ resizemouse(const Arg *arg) if (c->isfloating || NULL == c->mon->lt[c->mon->sellt]->arrange) { XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1); } else { - selmon->mfact = (double) (ev.xmotion.x_root - selmon->mx) / (double) selmon->ww; - arrange(selmon); XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->mx + (selmon->ww * selmon->mfact), selmon->my + (selmon->wh / 2)