summaryrefslogtreecommitdiffstats
path: root/libxrdp
diff options
context:
space:
mode:
authormetalefty <meta@vmeta.jp>2016-12-20 17:00:48 +0900
committerGitHub <noreply@github.com>2016-12-20 17:00:48 +0900
commit25e5243ecf9d0e17ca6fd0b71629f9dcab26dd5c (patch)
tree12335f9f2a7d1ac8cfe15c716451971b9cd6788f /libxrdp
parenta11af2bc95cc25a6e394f94640543cca494f3e27 (diff)
parent041df0911b428851f6146817fc70aa05029b15ba (diff)
downloadxrdp-proprietary-25e5243ecf9d0e17ca6fd0b71629f9dcab26dd5c.tar.gz
xrdp-proprietary-25e5243ecf9d0e17ca6fd0b71629f9dcab26dd5c.zip
Merge pull request #553 from jsorg71/libpainter
add libpainter for drawing when client does not have minimum orders
Diffstat (limited to 'libxrdp')
-rw-r--r--libxrdp/xrdp_caps.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c
index a8b9344f..f4e18395 100644
--- a/libxrdp/xrdp_caps.c
+++ b/libxrdp/xrdp_caps.c
@@ -159,6 +159,15 @@ xrdp_caps_process_order(struct xrdp_rdp *self, struct stream *s,
DEBUG(("desktop cache size %d", i));
in_uint8s(s, 4); /* Unknown */
in_uint8s(s, 4); /* Unknown */
+
+ /* check if libpainter should be used for drawing, instead of orders */
+ if (!(order_caps[TS_NEG_DSTBLT_INDEX] && order_caps[TS_NEG_PATBLT_INDEX] &&
+ order_caps[TS_NEG_SCRBLT_INDEX] && order_caps[TS_NEG_MEMBLT_INDEX]))
+ {
+ g_writeln("xrdp_caps_process_order: not enough orders supported by client, using painter.");
+ self->client_info.no_orders_supported = 1;
+ }
+
return 0;
}
@@ -682,6 +691,17 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
s->p = p + len + 4;
}
+ if (self->client_info.no_orders_supported &&
+ (self->client_info.offscreen_support_level != 0))
+ {
+ g_writeln("xrdp_caps_process_confirm_active: not enough orders "
+ "supported by client, client wants off screen bitmap but "
+ "offscreen bitmaps disabled");
+ self->client_info.offscreen_support_level = 0;
+ self->client_info.offscreen_cache_size = 0;
+ self->client_info.offscreen_cache_entries = 0;
+ }
+
DEBUG(("out xrdp_caps_process_confirm_active"));
return 0;
}