aewl

diff mouse.c @ 41:fc9ccd34b8ab

removed obsolete stuff
author Anselm R. Garbe <garbeam@wmii.de>
date Thu, 13 Jul 2006 10:25:57 +0200
parents 386649deb651
children
line diff
     1.1 --- a/mouse.c	Thu Jul 13 10:19:24 2006 +0200
     1.2 +++ b/mouse.c	Thu Jul 13 10:25:57 2006 +0200
     1.3 @@ -1,6 +1,5 @@
     1.4  /*
     1.5   * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
     1.6 - * (C)opyright MMVI Kris Maglione <fbsdaemon@gmail.com>
     1.7   * See LICENSE file for license details.
     1.8   */
     1.9  
    1.10 @@ -17,10 +16,10 @@
    1.11  mresize(Client *c)
    1.12  {
    1.13  	XEvent ev;
    1.14 -	int old_cx, old_cy;
    1.15 +	int ocx, ocy;
    1.16  
    1.17 -	old_cx = c->x;
    1.18 -	old_cy = c->y;
    1.19 +	ocx = c->x;
    1.20 +	ocy = c->y;
    1.21  	if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
    1.22  				None, cursor[CurResize], CurrentTime) != GrabSuccess)
    1.23  		return;
    1.24 @@ -34,10 +33,10 @@
    1.25  			break;
    1.26  		case MotionNotify:
    1.27  			XFlush(dpy);
    1.28 -			c->w = abs(old_cx - ev.xmotion.x);
    1.29 -			c->h = abs(old_cy - ev.xmotion.y);
    1.30 -			c->x = (old_cx <= ev.xmotion.x) ? old_cx : old_cx - c->w;
    1.31 -			c->y = (old_cy <= ev.xmotion.y) ? old_cy : old_cy - c->h;
    1.32 +			c->w = abs(ocx - ev.xmotion.x);
    1.33 +			c->h = abs(ocy - ev.xmotion.y);
    1.34 +			c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
    1.35 +			c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
    1.36  			resize(c);
    1.37  			break;
    1.38  		case ButtonRelease:
    1.39 @@ -51,12 +50,12 @@
    1.40  mmove(Client *c)
    1.41  {
    1.42  	XEvent ev;
    1.43 -	int x1, y1, old_cx, old_cy, di;
    1.44 +	int x1, y1, ocx, ocy, di;
    1.45  	unsigned int dui;
    1.46  	Window dummy;
    1.47  
    1.48 -	old_cx = c->x;
    1.49 -	old_cy = c->y;
    1.50 +	ocx = c->x;
    1.51 +	ocy = c->y;
    1.52  	if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
    1.53  				None, cursor[CurMove], CurrentTime) != GrabSuccess)
    1.54  		return;
    1.55 @@ -70,8 +69,8 @@
    1.56  			break;
    1.57  		case MotionNotify:
    1.58  			XFlush(dpy);
    1.59 -			c->x = old_cx + (ev.xmotion.x - x1);
    1.60 -			c->y = old_cy + (ev.xmotion.y - y1);
    1.61 +			c->x = ocx + (ev.xmotion.x - x1);
    1.62 +			c->y = ocy + (ev.xmotion.y - y1);
    1.63  			resize(c);
    1.64  			break;
    1.65  		case ButtonRelease: