about summary refs log tree commit diff stats
path: root/mouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'mouse.c')
-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 @@
 /*
  * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
- * (C)opyright MMVI Kris Maglione <fbsdaemon@gmail.com>
  * See LICENSE file for license details.
  */
 
@@ -17,10 +16,10 @@ void
 mresize(Client *c)
 {
 	XEvent ev;
-	int old_cx, old_cy;
+	int ocx, ocy;
 
-	old_cx = c->x;
-	old_cy = c->y;
+	ocx = c->x;
+	ocy = c->y;
 	if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
 				None, cursor[CurResize], CurrentTime) != GrabSuccess)
 		return;
@@ -34,10 +33,10 @@ mresize(Client *c)
 			break;
 		case MotionNotify:
 			XFlush(dpy);
-			c->w = abs(old_cx - ev.xmotion.x);
-			c->h = abs(old_cy - ev.xmotion.y);
-			c->x = (old_cx <= ev.xmotion.x) ? old_cx : old_cx - c->w;
-			c->y = (old_cy <= ev.xmotion.y) ? old_cy : old_cy - c->h;
+			c->w = abs(ocx - ev.xmotion.x);
+			c->h = abs(ocy - ev.xmotion.y);
+			c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
+			c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
 			resize(c);
 			break;
 		case ButtonRelease:
@@ -51,12 +50,12 @@ void
 mmove(Client *c)
 {
 	XEvent ev;
-	int x1, y1, old_cx, old_cy, di;
+	int x1, y1, ocx, ocy, di;
 	unsigned int dui;
 	Window dummy;
 
-	old_cx = c->x;
-	old_cy = c->y;
+	ocx = c->x;
+	ocy = c->y;
 	if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
 				None, cursor[CurMove], CurrentTime) != GrabSuccess)
 		return;
@@ -70,8 +69,8 @@ mmove(Client *c)
 			break;
 		case MotionNotify:
 			XFlush(dpy);
-			c->x = old_cx + (ev.xmotion.x - x1);
-			c->y = old_cy + (ev.xmotion.y - y1);
+			c->x = ocx + (ev.xmotion.x - x1);
+			c->y = ocy + (ev.xmotion.y - y1);
 			resize(c);
 			break;
 		case ButtonRelease:
t; 2010-04-19 00:34:37 +0200 api.commands: fixed python3 compatibiliy error' href='/akspecs/ranger/commit/ranger/api/commands.py?id=34414c3eae0c2b4d3a866ad00b2d995bb3312f53'>34414c3e ^
037862e3 ^


34414c3e ^
037862e3 ^











































34414c3e ^
037862e3 ^



34414c3e ^
037862e3 ^


















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184