Fixes two VNC issues reported in #107 — multi-second click latency on LAN and a missing remote cursor.
Highlights
Click latency — dropped from multi-second to ≈ one network RTT.
- Removed two hard-coded
targetFps = 10overrides that forced a 100 ms pacing tick on top of network RTT. - Replaced the fixed-interval sleep in the VNC client loop with a reactive wake: any pointer / key / clipboard send now kicks the next
FramebufferUpdateRequestout immediately instead of waiting for the scheduled tick. The FPS setting is still an upper bound.
Remote cursor is now drawn.
- The Cursor pseudo-encoding was previously decoded and thrown away. Replaced with a real decoder that builds an ARGB bitmap honouring the mask bits, and fires a new
VncConfig.onCursorUpdatecallback with the bitmap + hotspot. VncScreenoverlays the cursor at(pointer − hotspot), reusing the existing zoom/pan transform. (Desktop multi-tab view doesn't render the cursor yet — follow-up.)
ZRLE encoding implemented.
- Modern VNC servers (TigerVNC, RealVNC, wayvnc) prefer ZRLE. Haven now advertises
ZRLEfirst, followed byHEXTILE, ZLIB, RRE, COPYRECT, RAW. All five ZRLE subencodings supported (raw CPIXEL, solid, packed palette, plain RLE, palette RLE), on a session-continuous inflater independent of the ZLIB inflater. - Fixed a latent bug along the way:
ZLIBwas being decoded as if each rect carried its own zlib stream, but RFC 6143 §7.7.5 specifies a session-continuous stream. Also discovered that we had never actually advertisedZLIB— now fixed. - TIGHT encoding deferred; ZRLE alone should close the gap against Pi VNC servers.
Testing
- Unit: ZRLE solid / raw CPIXEL / packed palette fixtures, cursor mask decode, input-wake reactive pacing.
- Manual: end-to-end against a real Pi VNC server — not done by maintainer; awaiting reporter confirmation.
Build artifacts
Signed APKs for arm64 and x86_64 attached. Install the arm64 APK on phones/tablets; x86_64 is mostly for emulators.