any1 / neatvnc

A liberally licensed VNC server library with a clean interface
ISC License
126 stars 31 forks source link

Send queued message when switching to continuous updates #127

Closed jhofstee closed 3 weeks ago

jhofstee commented 4 weeks ago

Since n_pending_request is decremented after client_send_led_state is done, it should be incremented when the LED status is queued. Especially when continues updates are used this could lead to a single FramebufferUpdateRequest tiggering only a LED status message and not the framebuffer update itself and hence noVNC e.g. never showed the initial display.

I have read and understood CONTRIBUTING.md.

any1 commented 4 weeks ago

n_pending_requests should only be incremented when receiving a framebuffer update request. We might need to call process_fb_update_requests somewhere though to handle a situation where the count reaches zero before continuous updates are turned on, or something like that.

any1 commented 4 weeks ago

Does calling process_fb_update_requests inside on_client_enable_continuous_updates solve the problem?

jhofstee commented 4 weeks ago

calling process_fb_update_requests from on_client_enable_continuous_updates again will work as well, since n_pending_request is ignored in that case.