diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2025-06-13 21:58:11 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2025-06-13 21:58:11 -0700 |
commit | ed683c9966edc3522aec958bdb40e8ff8a20287f (patch) | |
tree | e17947b47a9e08d35e0f953f1147f26cf2a3ff3d | |
parent | 8aecd73cbe0471eafef90a5deea73f9e61c9d480 (diff) |
This actually became likely to happen with the introduction of
the 'm' modifier for moving the pointer to the focused window's
center.
Occasionally I'll accidentally initiate a resize after a Mod1-m
to brin the mouse pointer, because I'm accessing the xterm popup
window for tweaking something like font size. But instead of
pressing ctrl-rclick, I hit mod1-rclick, and if perfectly
centered, this would disappear the window on release.
Ultimately it's an off by one error of sorts, just give the
boundary case to the < side.
-rw-r--r-- | src/clickety.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clickety.c b/src/clickety.c index b5ea417..b7495c8 100644 --- a/src/clickety.c +++ b/src/clickety.c @@ -74,19 +74,19 @@ static void compute_resize(XEvent *terminus, XWindowAttributes *new) xdelta = xdelta / width_inc * width_inc; ydelta = ydelta / height_inc * height_inc; - if (clickety.impetus_x < dw && clickety.impetus_y < dh) { + if (clickety.impetus_x <= dw && clickety.impetus_y <= dh) { /* grabbed top left */ new->x = clickety.orig.x + xdelta; new->y = clickety.orig.y + ydelta; new->width = clickety.orig.width - xdelta; new->height = clickety.orig.height - ydelta; - } else if (clickety.impetus_x > dw && clickety.impetus_y < dh) { + } else if (clickety.impetus_x > dw && clickety.impetus_y <= dh) { /* grabbed top right */ new->x = clickety.orig.x; new->y = clickety.orig.y + ydelta; new->width = clickety.orig.width + xdelta; new->height = clickety.orig.height - ydelta; - } else if (clickety.impetus_x < dw && clickety.impetus_y > dh) { + } else if (clickety.impetus_x <= dw && clickety.impetus_y > dh) { /* grabbed bottom left */ new->x = clickety.orig.x + xdelta; new->y = clickety.orig.y; |