dwm-meillo
diff event.c @ 95:5d88952cbf96
implemened distinguishing float/managed geometries of clients (works quite well)
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Tue, 18 Jul 2006 12:36:57 +0200 |
parents | c498da7520c7 |
children | a19556fe83b5 |
line diff
1.1 --- a/event.c Tue Jul 18 11:45:32 2006 +0200 1.2 +++ b/event.c Tue Jul 18 12:36:57 2006 +0200 1.3 @@ -62,8 +62,8 @@ 1.4 unsigned int dui; 1.5 Window dummy; 1.6 1.7 - ocx = c->x; 1.8 - ocy = c->y; 1.9 + ocx = *c->x; 1.10 + ocy = *c->y; 1.11 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 1.12 None, cursor[CurMove], CurrentTime) != GrabSuccess) 1.13 return; 1.14 @@ -77,8 +77,8 @@ 1.15 break; 1.16 case MotionNotify: 1.17 XSync(dpy, False); 1.18 - c->x = ocx + (ev.xmotion.x - x1); 1.19 - c->y = ocy + (ev.xmotion.y - y1); 1.20 + *c->x = ocx + (ev.xmotion.x - x1); 1.21 + *c->y = ocy + (ev.xmotion.y - y1); 1.22 resize(c, False); 1.23 break; 1.24 case ButtonRelease: 1.25 @@ -94,12 +94,12 @@ 1.26 XEvent ev; 1.27 int ocx, ocy; 1.28 1.29 - ocx = c->x; 1.30 - ocy = c->y; 1.31 + ocx = *c->x; 1.32 + ocy = *c->y; 1.33 if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync, 1.34 None, cursor[CurResize], CurrentTime) != GrabSuccess) 1.35 return; 1.36 - XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w, c->h); 1.37 + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, *c->w, *c->h); 1.38 for(;;) { 1.39 XMaskEvent(dpy, MouseMask | ExposureMask, &ev); 1.40 switch(ev.type) { 1.41 @@ -109,10 +109,10 @@ 1.42 break; 1.43 case MotionNotify: 1.44 XSync(dpy, False); 1.45 - c->w = abs(ocx - ev.xmotion.x); 1.46 - c->h = abs(ocy - ev.xmotion.y); 1.47 - c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; 1.48 - c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; 1.49 + *c->w = abs(ocx - ev.xmotion.x); 1.50 + *c->h = abs(ocy - ev.xmotion.y); 1.51 + *c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - *c->w; 1.52 + *c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - *c->h; 1.53 resize(c, True); 1.54 break; 1.55 case ButtonRelease: 1.56 @@ -187,13 +187,13 @@ 1.57 if((c = getclient(ev->window))) { 1.58 gravitate(c, True); 1.59 if(ev->value_mask & CWX) 1.60 - c->x = ev->x; 1.61 + *c->x = ev->x; 1.62 if(ev->value_mask & CWY) 1.63 - c->y = ev->y; 1.64 + *c->y = ev->y; 1.65 if(ev->value_mask & CWWidth) 1.66 - c->w = ev->width; 1.67 + *c->w = ev->width; 1.68 if(ev->value_mask & CWHeight) 1.69 - c->h = ev->height; 1.70 + *c->h = ev->height; 1.71 if(ev->value_mask & CWBorderWidth) 1.72 c->border = 1; 1.73 gravitate(c, False);