aewl
diff event.c @ 105:3e74cc981e9b
refactored Sanders code somewhat
author | arg@10ksloc.org |
---|---|
date | Wed, 19 Jul 2006 13:52:31 +0200 |
parents | a19556fe83b5 |
children | f5b0c3d22d93 |
line diff
1.1 --- a/event.c Wed Jul 19 13:36:04 2006 +0200 1.2 +++ b/event.c Wed Jul 19 13:52:31 2006 +0200 1.3 @@ -114,17 +114,10 @@ 1.4 *c->h = abs(ocy - ev.xmotion.y); 1.5 *c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - *c->w; 1.6 *c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - *c->h; 1.7 - if(ocx <= ev.xmotion.x) { 1.8 - if(ocy <= ev.xmotion.y) 1.9 - sticky = TopLeft; 1.10 - else 1.11 - sticky = BottomLeft; 1.12 - } else { 1.13 - if(ocy <= ev.xmotion.y) 1.14 - sticky = TopRight; 1.15 - else 1.16 - sticky = BottomRight; 1.17 - } 1.18 + if(ocx <= ev.xmotion.x) 1.19 + sticky = (ocy <= ev.xmotion.y) ? TopLeft : BotLeft; 1.20 + else 1.21 + sticky = (ocy <= ev.xmotion.y) ? TopRight : BotRight; 1.22 resize(c, True, sticky); 1.23 break; 1.24 case ButtonRelease: