[hackers] [dwm] applied Hiltjo's multimon mouse-based resize fix || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Wed, 23 Mar 2011 08:59:01 +0000 (UTC)

changeset: 1531:8a52ed2f6e59
tag: tip
user: Anselm R Garbe <anselm_AT_garbe.us>
date: Wed Mar 23 08:58:57 2011 +0000
files: dwm.c
description:
applied Hiltjo's multimon mouse-based resize fix

diff -r 072c62ed10f2 -r 8a52ed2f6e59 dwm.c
--- a/dwm.c Fri Jan 07 16:05:22 2011 +0000
+++ b/dwm.c Wed Mar 23 08:58:57 2011 +0000
@@ -1365,8 +1365,8 @@
                 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))
Received on Wed Mar 23 2011 - 09:59:01 CET

This archive was generated by hypermail 2.2.0 : Wed Mar 23 2011 - 10:00:11 CET