summaryrefslogtreecommitdiffstats
path: root/x11vnc/xdamage.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/xdamage.c')
-rw-r--r--x11vnc/xdamage.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/x11vnc/xdamage.c b/x11vnc/xdamage.c
index 2343a98..08e2278 100644
--- a/x11vnc/xdamage.c
+++ b/x11vnc/xdamage.c
@@ -563,13 +563,22 @@ int xdamage_hint_skip(int y) {
if (ncache > 0) {
if (ncache_no_skip == 0) {
- if (dnow() > last_ncache_no_skip + 4.0) {
+ double now = dnow();
+ if (now > last_ncache_no_skip + 8.0) {
ncache_no_skip = 1;
+ } else if (now < last_bs_restore + 0.5) {
+ ncache_no_skip = 1;
+ } else if (now < last_su_restore + 0.5) {
+ ncache_no_skip = 1;
+ } else if (now < last_copyrect + 0.5) {
+ ncache_no_skip = 1;
+ }
+ if (ncache_no_skip) {
last_ncache_no_skip = dnow();
return 0;
}
} else {
- if (++ncache_no_skip >= 2*nreg) {
+ if (ncache_no_skip++ >= 1*nreg + 4) {
ncache_no_skip = 0;
} else {
return 0;