- 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;