diff --git a/ui/vnc.c b/ui/vnc.c index 548588aab89ee2c71a5033ad657aa4dce6ed46ad..f8d9b7db9571e04cf4fd361853ac205f470f4be2 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -887,6 +887,7 @@ static int find_and_clear_dirty_height(struct VncState *vs, static int vnc_update_client(VncState *vs, int has_dirty, bool sync) { + vs->has_dirty += has_dirty; if (vs->need_update && vs->csock != -1) { VncDisplay *vd = vs->vd; VncJob *job; @@ -898,7 +899,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) /* kernel send buffers are full -> drop frames to throttle */ return 0; - if (!has_dirty && !vs->audio_cap && !vs->force_update) + if (!vs->has_dirty && !vs->audio_cap && !vs->force_update) return 0; /* @@ -941,6 +942,7 @@ static int vnc_update_client(VncState *vs, int has_dirty, bool sync) vnc_jobs_join(vs); } vs->force_update = 0; + vs->has_dirty = 0; return n; } @@ -1878,6 +1880,7 @@ static void framebuffer_update_request(VncState *vs, int incremental, return; } + vs->force_update = 1; vnc_set_area_dirty(vs->dirty, width, height, x, y, w, h); } diff --git a/ui/vnc.h b/ui/vnc.h index 8f582fdc6cd669d18e3b2dd8b9782d64aa5cf694..334de9ddb1ba823d2b7e092ce20bdf3bf3cfaf41 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -263,6 +263,7 @@ struct VncState VncDisplay *vd; int need_update; int force_update; + int has_dirty; uint32_t features; int absolute; int last_x;