JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
changing snap priority
authorarg@mig29 <unknown>
Mon, 30 Oct 2006 11:07:00 +0000 (12:07 +0100)
committerarg@mig29 <unknown>
Mon, 30 Oct 2006 11:07:00 +0000 (12:07 +0100)
event.c

diff --git a/event.c b/event.c
index f0e88d0..007dbbc 100644 (file)
--- a/event.c
+++ b/event.c
@@ -50,11 +50,11 @@ movemouse(Client *c) {
                        c->y = ocy + (ev.xmotion.y - y1);
                        if(abs(c->x) < sx + SNAP)
                                c->x = sx;
+                       else if(c->x + c->w > sx + sw - SNAP)
+                               c->x = sw - c->w - 2 * BORDERPX;
                        if(abs(c->y) < sy + bh + SNAP)
                                c->y = sy + bh;
-                       if(c->x + c->w > sx + sw - SNAP)
-                               c->x = sw - c->w - 2 * BORDERPX;
-                       if(c->y + c->h > sy + sh - SNAP)
+                       else if(c->y + c->h > sy + sh - SNAP)
                                c->y = sh - c->h - 2 * BORDERPX;
                        resize(c, False, TopLeft);
                        break;