summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-13 10:25:57 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-13 10:25:57 +0200
commit3f942f9e798d4222116ae4c083d2482ddb1e972b (patch)
tree7fcba837c725e30fe6e687fa8d1074093fa74726
parentfixed grammar bug reported by John-Galt (diff)
downloaddwm-3f942f9e798d4222116ae4c083d2482ddb1e972b.tar.gz
dwm-3f942f9e798d4222116ae4c083d2482ddb1e972b.zip
removed obsolete stuff
Diffstat (limited to '')
-rw-r--r--mouse.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/mouse.c b/mouse.c
index ff81701..041ab03 100644
--- a/mouse.c
+++ b/mouse.c
@@ -1,6 +1,5 @@
1/* 1/*
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> 2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * (C)opyright MMVI Kris Maglione <fbsdaemon@gmail.com>
4 * See LICENSE file for license details. 3 * See LICENSE file for license details.
5 */ 4 */
6 5
@@ -17,10 +16,10 @@ void
17mresize(Client *c) 16mresize(Client *c)
18{ 17{
19 XEvent ev; 18 XEvent ev;
20 int old_cx, old_cy; 19 int ocx, ocy;
21 20
22 old_cx = c->x; 21 ocx = c->x;
23 old_cy = c->y; 22 ocy = c->y;
24 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 23 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
25 None, cursor[CurResize], CurrentTime) != GrabSuccess) 24 None, cursor[CurResize], CurrentTime) != GrabSuccess)
26 return; 25 return;
@@ -34,10 +33,10 @@ mresize(Client *c)
34 break; 33 break;
35 case MotionNotify: 34 case MotionNotify:
36 XFlush(dpy); 35 XFlush(dpy);
37 c->w = abs(old_cx - ev.xmotion.x); 36 c->w = abs(ocx - ev.xmotion.x);
38 c->h = abs(old_cy - ev.xmotion.y); 37 c->h = abs(ocy - ev.xmotion.y);
39 c->x = (old_cx <= ev.xmotion.x) ? old_cx : old_cx - c->w; 38 c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
40 c->y = (old_cy <= ev.xmotion.y) ? old_cy : old_cy - c->h; 39 c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
41 resize(c); 40 resize(c);
42 break; 41 break;
43 case ButtonRelease: 42 case ButtonRelease:
@@ -51,12 +50,12 @@ void
51mmove(Client *c) 50mmove(Client *c)
52{ 51{
53 XEvent ev; 52 XEvent ev;
54 int x1, y1, old_cx, old_cy, di; 53 int x1, y1, ocx, ocy, di;
55 unsigned int dui; 54 unsigned int dui;
56 Window dummy; 55 Window dummy;
57 56
58 old_cx = c->x; 57 ocx = c->x;
59 old_cy = c->y; 58 ocy = c->y;
60 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 59 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
61 None, cursor[CurMove], CurrentTime) != GrabSuccess) 60 None, cursor[CurMove], CurrentTime) != GrabSuccess)
62 return; 61 return;
@@ -70,8 +69,8 @@ mmove(Client *c)
70 break; 69 break;
71 case MotionNotify: 70 case MotionNotify:
72 XFlush(dpy); 71 XFlush(dpy);
73 c->x = old_cx + (ev.xmotion.x - x1); 72 c->x = ocx + (ev.xmotion.x - x1);
74 c->y = old_cy + (ev.xmotion.y - y1); 73 c->y = ocy + (ev.xmotion.y - y1);
75 resize(c); 74 resize(c);
76 break; 75 break;
77 case ButtonRelease: 76 case ButtonRelease: