aboutsummaryrefslogtreecommitdiff
path: root/grab.c
diff options
context:
space:
mode:
Diffstat (limited to 'grab.c')
-rw-r--r--grab.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/grab.c b/grab.c
index 136ab5f..6b53ff4 100644
--- a/grab.c
+++ b/grab.c
@@ -599,10 +599,11 @@ int sweepdrag(
// XGrabServer(dpy);
idle = 0;
}
- if (e0 || bl != BorderUnknown)
+ if (e0 || bl != BorderUnknown) {
notmoved = recalc(c, rx, ry, bl, notmoved);
- else
+ } else {
notmoved = recalc(c, rx - cx, ry - cy, bl, notmoved);
+ }
cx = rx;
cy = ry;
drawbound(c, 1);
@@ -632,7 +633,9 @@ int sweepdrag(
c->y += BORDER;
c->dx -= 2 * BORDER;
c->dy -= 2 * BORDER;
- if (c->dx < 4 || c->dy < 4 || c->dx < c->min_dx || c->dy < c->min_dy)
+ if (
+ recalc != dragcalc &&
+ (c->dx < 4 || c->dy < 4 || c->dx < c->min_dx || c->dy < c->min_dy))
goto bad;
return 1;
}