summaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'event.c')
-rw-r--r--event.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/event.c b/event.c
index 4b8c07b..db95dfd 100644
--- a/event.c
+++ b/event.c
@@ -62,8 +62,8 @@ movemouse(Client *c)
62 unsigned int dui; 62 unsigned int dui;
63 Window dummy; 63 Window dummy;
64 64
65 ocx = c->x; 65 ocx = *c->x;
66 ocy = c->y; 66 ocy = *c->y;
67 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 67 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
68 None, cursor[CurMove], CurrentTime) != GrabSuccess) 68 None, cursor[CurMove], CurrentTime) != GrabSuccess)
69 return; 69 return;
@@ -77,8 +77,8 @@ movemouse(Client *c)
77 break; 77 break;
78 case MotionNotify: 78 case MotionNotify:
79 XSync(dpy, False); 79 XSync(dpy, False);
80 c->x = ocx + (ev.xmotion.x - x1); 80 *c->x = ocx + (ev.xmotion.x - x1);
81 c->y = ocy + (ev.xmotion.y - y1); 81 *c->y = ocy + (ev.xmotion.y - y1);
82 resize(c, False); 82 resize(c, False);
83 break; 83 break;
84 case ButtonRelease: 84 case ButtonRelease:
@@ -94,12 +94,12 @@ resizemouse(Client *c)
94 XEvent ev; 94 XEvent ev;
95 int ocx, ocy; 95 int ocx, ocy;
96 96
97 ocx = c->x; 97 ocx = *c->x;
98 ocy = c->y; 98 ocy = *c->y;
99 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 99 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
100 None, cursor[CurResize], CurrentTime) != GrabSuccess) 100 None, cursor[CurResize], CurrentTime) != GrabSuccess)
101 return; 101 return;
102 XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h); 102 XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, *c->w, *c->h);
103 for(;;) { 103 for(;;) {
104 XMaskEvent(dpy, MouseMask | ExposureMask, &ev); 104 XMaskEvent(dpy, MouseMask | ExposureMask, &ev);
105 switch(ev.type) { 105 switch(ev.type) {
@@ -109,10 +109,10 @@ resizemouse(Client *c)
109 break; 109 break;
110 case MotionNotify: 110 case MotionNotify:
111 XSync(dpy, False); 111 XSync(dpy, False);
112 c->w = abs(ocx - ev.xmotion.x); 112 *c->w = abs(ocx - ev.xmotion.x);
113 c->h = abs(ocy - ev.xmotion.y); 113 *c->h = abs(ocy - ev.xmotion.y);
114 c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; 114 *c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - *c->w;
115 c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; 115 *c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - *c->h;
116 resize(c, True); 116 resize(c, True);
117 break; 117 break;
118 case ButtonRelease: 118 case ButtonRelease:
@@ -187,13 +187,13 @@ configurerequest(XEvent *e)
187 if((c = getclient(ev->window))) { 187 if((c = getclient(ev->window))) {
188 gravitate(c, True); 188 gravitate(c, True);
189 if(ev->value_mask & CWX) 189 if(ev->value_mask & CWX)
190 c->x = ev->x; 190 *c->x = ev->x;
191 if(ev->value_mask & CWY) 191 if(ev->value_mask & CWY)
192 c->y = ev->y; 192 *c->y = ev->y;
193 if(ev->value_mask & CWWidth) 193 if(ev->value_mask & CWWidth)
194 c->w = ev->width; 194 *c->w = ev->width;
195 if(ev->value_mask & CWHeight) 195 if(ev->value_mask & CWHeight)
196 c->h = ev->height; 196 *c->h = ev->height;
197 if(ev->value_mask & CWBorderWidth) 197 if(ev->value_mask & CWBorderWidth)
198 c->border = 1; 198 c->border = 1;
199 gravitate(c, False); 199 gravitate(c, False);