event.c
changeset 105 3e74cc981e9b
parent 99 a19556fe83b5
child 107 f5b0c3d22d93
--- a/event.c	Wed Jul 19 13:36:04 2006 +0200
+++ b/event.c	Wed Jul 19 13:52:31 2006 +0200
@@ -114,17 +114,10 @@
 			*c->h = abs(ocy - ev.xmotion.y);
 			*c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - *c->w;
 			*c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - *c->h;
-			if(ocx <= ev.xmotion.x) {
-				if(ocy <= ev.xmotion.y)
-					sticky = TopLeft;
-				else
-					sticky = BottomLeft;
-			} else {
-				if(ocy <= ev.xmotion.y)
-					sticky = TopRight;
-				else
-					sticky = BottomRight;
-			}
+			if(ocx <= ev.xmotion.x)
+				sticky = (ocy <= ev.xmotion.y) ? TopLeft : BotLeft;
+			else
+				sticky = (ocy <= ev.xmotion.y) ? TopRight : BotRight;
 			resize(c, True, sticky);
 			break;
 		case ButtonRelease: