File xrdp-vnc-enable-32-bpp-support-for-Xvnc-it-actually-works.patch of Package xrdp
diff -aur xrdp-0.9.0~git.1456906198.f422461-orig/vnc/vnc.c xrdp-0.9.0~git.1456906198.f422461/vnc/vnc.c
--- xrdp-0.9.0~git.1456906198.f422461-orig/vnc/vnc.c 2017-02-01 12:54:47.000000000 +0100
+++ xrdp-0.9.0~git.1456906198.f422461/vnc/vnc.c 2017-02-01 12:59:28.000000000 +0100
@@ -949,15 +949,21 @@
v->server_msg(v, "VNC started connecting", 0);
check_sec_result = 1;
- /* only support 8 and 16 bpp connections from rdp client */
- if ((v->server_bpp != 15) &&
- (v->server_bpp != 16) && (v->server_bpp != 24))
+ /* check if bpp is supported for rdp connection */
+ switch (v->server_bpp)
{
- v->server_msg(v, "VNC error - only supporting 15, 16 and 24 bpp "
- "connections", 0);
- if (v->server_bpp == 8)
+
+ case 15:
+ case 16:
+ case 24:
+ case 32:
+ break;
+ case 8:
v->server_msg(v, "VNC error - 8 bpp support is dropped "
"since Xvnc 1.4.0", 0);
+ default:
+ v->server_msg(v, "VNC error - only supporting 15, 16, 24 and 32 "
+ "bpp rdp connections", 0);
return 1;
}