summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2011-03-22 10:59:08 +0000
committerokan <okan>2011-03-22 10:59:08 +0000
commita50bfb613dab86e9b124324dff4289bc4679423f (patch)
treeeea8e4634eaad1f806326c56e1f6a12c97268fef /mousefunc.c
parent2c706e60c7b9c7da4198fac2ca9bc01e7d26895a (diff)
downloadcwm-a50bfb613dab86e9b124324dff4289bc4679423f.tar.gz
cwm-a50bfb613dab86e9b124324dff4289bc4679423f.tar.xz
cwm-a50bfb613dab86e9b124324dff4289bc4679423f.zip
reduce the number of times we sync during a window resize.
ok oga@
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 5c14062..3707f65 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -106,8 +106,8 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg)
 				/* Recompute window output */
 				mousefunc_sweep_draw(cc);
 
-			/* don't sync more than 60 times / second */
-			if ((ev.xmotion.time - time) > (1000 / 60)) {
+			/* don't sync more than 10 times / second */
+			if ((ev.xmotion.time - time) > (1000 / 10)) {
 				time = ev.xmotion.time;
 				XSync(X_Dpy, False);
 				client_resize(cc);
@@ -128,7 +128,6 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg)
 			if (cc->ptr.y > cc->geom.height)
 				cc->ptr.y = cc->geom.height - cc->bwidth;
 			client_ptrwarp(cc);
-
 			return;
 		}
 	}
@@ -160,8 +159,8 @@ mousefunc_window_move(struct client_ctx *cc, void *arg)
 			cc->geom.x = ev.xmotion.x_root - px - cc->bwidth;
 			cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
 
-			/* don't sync more than 60 times / second */
-			if ((ev.xmotion.time - time) > (1000 / 60)) {
+			/* don't sync more than 10 times / second */
+			if ((ev.xmotion.time - time) > (1000 / 10)) {
 				time = ev.xmotion.time;
 				XSync(X_Dpy, False);
 				client_move(cc);