mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
reduce the number of times we sync during a window resize.
ok oga@
This commit is contained in:
parent
2c706e60c7
commit
a50bfb613d
@ -106,8 +106,8 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg)
|
|||||||
/* Recompute window output */
|
/* Recompute window output */
|
||||||
mousefunc_sweep_draw(cc);
|
mousefunc_sweep_draw(cc);
|
||||||
|
|
||||||
/* don't sync more than 60 times / second */
|
/* don't sync more than 10 times / second */
|
||||||
if ((ev.xmotion.time - time) > (1000 / 60)) {
|
if ((ev.xmotion.time - time) > (1000 / 10)) {
|
||||||
time = ev.xmotion.time;
|
time = ev.xmotion.time;
|
||||||
XSync(X_Dpy, False);
|
XSync(X_Dpy, False);
|
||||||
client_resize(cc);
|
client_resize(cc);
|
||||||
@ -128,7 +128,6 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg)
|
|||||||
if (cc->ptr.y > cc->geom.height)
|
if (cc->ptr.y > cc->geom.height)
|
||||||
cc->ptr.y = cc->geom.height - cc->bwidth;
|
cc->ptr.y = cc->geom.height - cc->bwidth;
|
||||||
client_ptrwarp(cc);
|
client_ptrwarp(cc);
|
||||||
|
|
||||||
return;
|
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.x = ev.xmotion.x_root - px - cc->bwidth;
|
||||||
cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
|
cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
|
||||||
|
|
||||||
/* don't sync more than 60 times / second */
|
/* don't sync more than 10 times / second */
|
||||||
if ((ev.xmotion.time - time) > (1000 / 60)) {
|
if ((ev.xmotion.time - time) > (1000 / 10)) {
|
||||||
time = ev.xmotion.time;
|
time = ev.xmotion.time;
|
||||||
XSync(X_Dpy, False);
|
XSync(X_Dpy, False);
|
||||||
client_move(cc);
|
client_move(cc);
|
||||||
|
Loading…
Reference in New Issue
Block a user