diff options
author | arg@mig29 <unknown> | 2006-11-16 14:40:57 +0100 |
---|---|---|
committer | arg@mig29 <unknown> | 2006-11-16 14:40:57 +0100 |
commit | b003a35fde6e83bd65efa6d195d96a835fd457ea (patch) | |
tree | 4153d96645007495a57cece41412b00d802e3ecc /event.c | |
parent | df1a0f9445d4f14e3b5a464a577018f755ea1b5f (diff) | |
download | dwm-b003a35fde6e83bd65efa6d195d96a835fd457ea.tar.gz |
applied Gottox' windowarea patch
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/event.c b/event.c index e3bdea4..23dcf55 100644 --- a/event.c +++ b/event.c @@ -48,14 +48,14 @@ movemouse(Client *c) { XSync(dpy, False); c->x = ocx + (ev.xmotion.x - x1); c->y = ocy + (ev.xmotion.y - y1); - 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; - if(abs((sy + bh) - c->y) < SNAP) - c->y = sy + bh; - else if(abs((sy + sh) - (c->y + c->h)) < SNAP) - c->y = sh - c->h - 2 * BORDERPX; + if(abs(wax + c->x) < SNAP) + c->x = wax; + else if(abs((wax + waw) - (c->x + c->w)) < SNAP) + c->x = wax + waw - c->w - 2 * BORDERPX; + if(abs(way - c->y) < SNAP) + c->y = way; + else if(abs((way + wah) - (c->y + c->h)) < SNAP) + c->y = way + wah - c->h - 2 * BORDERPX; resize(c, False, TopLeft); break; } |