comparison dev.c @ 52:d18f6dd0cf23

fixed several things, nearly feature complete
author Anselm R. Garbe <garbeam@wmii.de>
date Thu, 13 Jul 2006 20:28:19 +0200
parents 035617ee18d1
children 529901e6a227
comparison
equal deleted inserted replaced
51:035617ee18d1 52:d18f6dd0cf23
102 XFlush(dpy); 102 XFlush(dpy);
103 c->w = abs(ocx - ev.xmotion.x); 103 c->w = abs(ocx - ev.xmotion.x);
104 c->h = abs(ocy - ev.xmotion.y); 104 c->h = abs(ocy - ev.xmotion.y);
105 c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w; 105 c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - c->w;
106 c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h; 106 c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - c->h;
107 resize(c); 107 resize(c, True);
108 break; 108 break;
109 case ButtonRelease: 109 case ButtonRelease:
110 XUngrabPointer(dpy, CurrentTime); 110 XUngrabPointer(dpy, CurrentTime);
111 return; 111 return;
112 } 112 }
136 break; 136 break;
137 case MotionNotify: 137 case MotionNotify:
138 XFlush(dpy); 138 XFlush(dpy);
139 c->x = ocx + (ev.xmotion.x - x1); 139 c->x = ocx + (ev.xmotion.x - x1);
140 c->y = ocy + (ev.xmotion.y - y1); 140 c->y = ocy + (ev.xmotion.y - y1);
141 resize(c); 141 resize(c, False);
142 break; 142 break;
143 case ButtonRelease: 143 case ButtonRelease:
144 XUngrabPointer(dpy, CurrentTime); 144 XUngrabPointer(dpy, CurrentTime);
145 return; 145 return;
146 } 146 }