X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=event.c;h=e4dfad1638c5edea51c2a8868782e0bc1d43be6e;hp=9d693733249eb165526b8f7c50fa5294e1155885;hb=4491bdda69f20d976bd61ba92b766dac56c07212;hpb=c53980cddcee8afd13ea793134ed3ddf5dbef0e3 diff --git a/event.c b/event.c index 9d69373..e4dfad1 100644 --- a/event.c +++ b/event.c @@ -114,17 +114,10 @@ resizemouse(Client *c) *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: