Hi all!
I am not sure, if my patch is *right way*, but it helps me to avoid
lags/memory effect and high cpu usage while movemouse/resizemouse on my system.
Hopes, it will help for someone... :)

Thanx for dwm. :)

w.b.r Peter
diff -Nur dwm-5.2/dwm.c dwm-5.2.moveresize/dwm.c
--- dwm-5.2/dwm.c	2008-09-09 23:46:17.000000000 +0400
+++ dwm-5.2.moveresize/dwm.c	2008-10-07 13:10:07.000000000 +0400
@@ -961,6 +961,8 @@
 			break;
 		case MotionNotify:
 			XSync(dpy, False);
+			if (XCheckMaskEvent(dpy, MOUSEMASK, &ev))
+				break;
 			nx = ocx + (ev.xmotion.x - x);
 			ny = ocy + (ev.xmotion.y - y);
 			if(snap && nx >= wx && nx <= wx + ww
@@ -1130,9 +1132,10 @@
 			break;
 		case MotionNotify:
 			XSync(dpy, False);
+			if (XCheckMaskEvent(dpy, MOUSEMASK, &ev))
+				break;
 			nw = MAX(ev.xmotion.x - NOBORDER(ocx) + 1, 1);
 			nh = MAX(ev.xmotion.y - NOBORDER(ocy) + 1, 1);
-
 			if(snap && nw >= wx && nw <= wx + ww
 			        && nh >= wy && nh <= wy + wh) {
 				if(!c->isfloating && lt[sellt]->arrange

Reply via email to