mirror of git://git.suckless.org/dwm
make sure that changing sx has no impact on snapping
This commit is contained in:
parent
b76561a212
commit
04b633ddf3
2
event.c
2
event.c
|
@ -48,7 +48,7 @@ movemouse(Client *c) {
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
c->x = ocx + (ev.xmotion.x - x1);
|
c->x = ocx + (ev.xmotion.x - x1);
|
||||||
c->y = ocy + (ev.xmotion.y - y1);
|
c->y = ocy + (ev.xmotion.y - y1);
|
||||||
if(abs(c->x) < SNAP)
|
if(abs(sx + c->x) < SNAP)
|
||||||
c->x = sx;
|
c->x = sx;
|
||||||
else if(abs((sx + sw) - (c->x + c->w)) < SNAP)
|
else if(abs((sx + sw) - (c->x + c->w)) < SNAP)
|
||||||
c->x = sw - c->w - 2 * BORDERPX;
|
c->x = sw - c->w - 2 * BORDERPX;
|
||||||
|
|
Loading…
Reference in New Issue