diff -r c0a0245b9815 -r 12deea36603d event.c --- a/event.c Mon Oct 30 12:40:10 2006 +0100 +++ b/event.c Tue Oct 31 09:02:16 2006 +0100 @@ -48,7 +48,7 @@ XSync(dpy, False); c->x = ocx + (ev.xmotion.x - x1); c->y = ocy + (ev.xmotion.y - y1); - if(abs(c->x) < SNAP) + if(abs(sx + c->x) < SNAP) c->x = sx; else if(abs((sx + sw) - (c->x + c->w)) < SNAP) c->x = sw - c->w - 2 * BORDERPX;