X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=dwm.c;h=1297b2b0d707455a12055bdaceac44ebfb6fcf35;hp=4a8ee32f0185f4130d8d0cf3b41b29bf0faf4147;hb=96f9855248545d6e6da1aeece04e44a1f7246ccb;hpb=dd46d5b588dc5d33940bde87817f3e8d608788d4 diff --git a/dwm.c b/dwm.c index 4a8ee32..1297b2b 100644 --- a/dwm.c +++ b/dwm.c @@ -1202,7 +1202,7 @@ movemouse(const Arg *arg) { case MotionNotify: nx = ocx + (ev.xmotion.x - x); ny = ocy + (ev.xmotion.y - y); - if(snap && nx >= selmon->wx && nx <= selmon->wx + selmon->ww + if(nx >= selmon->wx && nx <= selmon->wx + selmon->ww && ny >= selmon->wy && ny <= selmon->wy + selmon->wh) { if(abs(selmon->wx - nx) < snap) nx = selmon->wx; @@ -1365,7 +1365,7 @@ resizemouse(const Arg *arg) { case MotionNotify: nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1); nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1); - if(snap && c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww + if(c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww && c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh) { if(!c->isfloating && selmon->lt[selmon->sellt]->arrange