diff options
author | okan | 2011-03-22 10:59:08 +0000 |
---|---|---|
committer | okan | 2011-03-22 10:59:08 +0000 |
commit | eb5a2d629977996756358281a8182c430aed08f4 (patch) | |
tree | 0214cab1b80ada512c982b5676aa666ef7f1f5a7 | |
parent | c5841193570edf6eca119c583d9e790eef12dcb1 (diff) | |
download | cwm-eb5a2d629977996756358281a8182c430aed08f4.tar.gz |
reduce the number of times we sync during a window resize.
ok oga@
Diffstat (limited to '')
-rw-r--r-- | mousefunc.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mousefunc.c b/mousefunc.c index cdc0e46..7ce0352 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: mousefunc.c,v 1.20 2010/12/14 11:08:47 martynas Exp $ + * $Id: mousefunc.c,v 1.21 2011/03/22 10:59:08 okan Exp $ */ #include <sys/param.h> @@ -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); |