removed obsolete stuff
3f942f9e
1 file(s) · +12 −13
| 1 | 1 | /* |
|
| 2 | 2 | * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> |
|
| 3 | - | * (C)opyright MMVI Kris Maglione <fbsdaemon@gmail.com> |
|
| 4 | 3 | * See LICENSE file for license details. |
|
| 5 | 4 | */ |
|
| 6 | 5 | ||
| 17 | 16 | mresize(Client *c) |
|
| 18 | 17 | { |
|
| 19 | 18 | XEvent ev; |
|
| 20 | - | int old_cx, old_cy; |
|
| 19 | + | int ocx, ocy; |
|
| 21 | 20 | ||
| 22 | - | old_cx = c->x; |
|
| 23 | - | old_cy = c->y; |
|
| 21 | + | ocx = c->x; |
|
| 22 | + | ocy = c->y; |
|
| 24 | 23 | if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, |
|
| 25 | 24 | None, cursor[CurResize], CurrentTime) != GrabSuccess) |
|
| 26 | 25 | return; |
|
| 34 | 33 | break; |
|
| 35 | 34 | case MotionNotify: |
|
| 36 | 35 | XFlush(dpy); |
|
| 37 | - | c->w = abs(old_cx - ev.xmotion.x); |
|
| 38 | - | c->h = abs(old_cy - ev.xmotion.y); |
|
| 39 | - | c->x = (old_cx <= ev.xmotion.x) ? old_cx : old_cx - c->w; |
|
| 40 | - | c->y = (old_cy <= ev.xmotion.y) ? old_cy : old_cy - c->h; |
|
| 36 | + | c->w = abs(ocx - ev.xmotion.x); |
|
| 37 | + | c->h = abs(ocy - ev.xmotion.y); |
|
| 38 | + | c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; |
|
| 39 | + | c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; |
|
| 41 | 40 | resize(c); |
|
| 42 | 41 | break; |
|
| 43 | 42 | case ButtonRelease: |
|
| 51 | 50 | mmove(Client *c) |
|
| 52 | 51 | { |
|
| 53 | 52 | XEvent ev; |
|
| 54 | - | int x1, y1, old_cx, old_cy, di; |
|
| 53 | + | int x1, y1, ocx, ocy, di; |
|
| 55 | 54 | unsigned int dui; |
|
| 56 | 55 | Window dummy; |
|
| 57 | 56 | ||
| 58 | - | old_cx = c->x; |
|
| 59 | - | old_cy = c->y; |
|
| 57 | + | ocx = c->x; |
|
| 58 | + | ocy = c->y; |
|
| 60 | 59 | if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, |
|
| 61 | 60 | None, cursor[CurMove], CurrentTime) != GrabSuccess) |
|
| 62 | 61 | return; |
|
| 70 | 69 | break; |
|
| 71 | 70 | case MotionNotify: |
|
| 72 | 71 | XFlush(dpy); |
|
| 73 | - | c->x = old_cx + (ev.xmotion.x - x1); |
|
| 74 | - | c->y = old_cy + (ev.xmotion.y - y1); |
|
| 72 | + | c->x = ocx + (ev.xmotion.x - x1); |
|
| 73 | + | c->y = ocy + (ev.xmotion.y - y1); |
|
| 75 | 74 | resize(c); |
|
| 76 | 75 | break; |
|
| 77 | 76 | case ButtonRelease: |
|