aboutsummaryrefslogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2011-03-23 08:58:57 +0000
committerAnselm R Garbe <anselm@garbe.us>2011-03-23 08:58:57 +0000
commitdd46d5b588dc5d33940bde87817f3e8d608788d4 (patch)
treee58928f792e04e38b2ae8d1f2fb6aee4e46226c1 /dwm.c
parent0bc4e41ebdf4dfbdb4e865ab5297f5df4f0d9e16 (diff)
downloaddwm-dd46d5b588dc5d33940bde87817f3e8d608788d4.tar.gz
applied Hiltjo's multimon mouse-based resize fix
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index be11381..4a8ee32 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1365,8 +1365,8 @@ 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 && nw >= selmon->wx && nw <= selmon->wx + selmon->ww
- && nh >= selmon->wy && nh <= selmon->wy + selmon->wh)
+ if(snap && 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
&& (abs(nw - c->w) > snap || abs(nh - c->h) > snap))