UltraVNC viewer: 1.3.3 dev 10, 1.3.2, 1.2.4.0, etc.
vncserver: TigerVNC server 1.9.0+dfsg-3+deb10u3 (debian buster)
Server OS: Debian GNU Linux (buster)
Client OS: Windows 10 x64 (21H1)
Overview:
If UltraVNC viewer connects to tigervnc-server (in Linux) with 16 bit color depth, cursor color is broken.
Steps to reproduce the issue:
1. Install tigervnc-standalone-server in debian (buster).
2. Start vncserver in debian with
Code: Select all
vncserver -geometry 1024x768 -depth 16
Resulting screenshot with the issue (Enlarged x4):
Expected screenshot without the issue (Enlarged x4):
I looked into this problem with UltraVNC source code in GitHub, and found the following patch fixes the issue.
The patch which fixes the issue:
Code: Select all
diff --git a/vncviewer/ClientConnectionCursor.cpp b/vncviewer/ClientConnectionCursor.cpp
index 3d3b1a6..e543519 100755
--- a/vncviewer/ClientConnectionCursor.cpp
+++ b/vncviewer/ClientConnectionCursor.cpp
@@ -94,11 +94,13 @@ void ClientConnection::ReadCursorShape(rfbFramebufferUpdateRectHeader *pfburh) {
p++;
break;
case 16:
- rcSource[i] = COLOR_FROM_PIXEL16_ADDRESS(p);
+ //rcSource[i] = COLOR_FROM_PIXEL16_ADDRESS(p);
+ rcSource[i] = *(CARD16*)p; /* No conversion because BI_BITFIELDS is used. */
p += 2;
break;
case 32:
- rcSource[i] = COLOR_FROM_PIXEL32_ADDRESS(p);
+ //rcSource[i] = COLOR_FROM_PIXEL32_ADDRESS(p);
+ rcSource[i] = *(CARD32*)p; /* No conversion because BI_BITFIELDS is used. */
p += 4;
break;
}