From 297e22b588320506669e390d29d1c08c20324c84 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Fri, 10 Apr 2020 12:07:35 +0000 Subject: [PATCH] Don't render when a client is still encoding --- src/server.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 12c19b7..f73a779 100644 --- a/src/server.c +++ b/src/server.c @@ -806,14 +806,21 @@ bool nvnc__is_damaged(struct nvnc* self) void on_main_dispatch(void* aml_obj) { struct nvnc* self = aml_get_userdata(aml_obj); + struct nvnc_client* client; if (!nvnc__is_damaged(self)) return; + LIST_FOREACH(client, &self->clients, link) + if (client->is_updating) { + log_debug("Can't render yet: still encoding for client %p\n", + client); + return; + } + if (self->render_fn) self->render_fn(self, self->buffer); - struct nvnc_client* client; LIST_FOREACH(client, &self->clients, link) process_fb_update_requests(client); }