From 4f90feb8cf61bebc3834c6ba30e9652ba71904b3 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 17 Feb 2012 13:57:27 -0800 Subject: [PATCH] Implement DstBlt for ROP3==0 (blackness) --- protocols/rdp/src/rdp_gdi.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/protocols/rdp/src/rdp_gdi.c b/protocols/rdp/src/rdp_gdi.c index 8ec80a01..4159d77e 100644 --- a/protocols/rdp/src/rdp_gdi.c +++ b/protocols/rdp/src/rdp_gdi.c @@ -43,8 +43,32 @@ #include "rdp_bitmap.h" void guac_rdp_gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt) { + guac_client* client = ((rdp_freerdp_context*) context)->client; - guac_client_log_info(client, "guac_rdp_gdi_dstblt()"); + const guac_layer* current_layer = ((rdp_guac_client_data*) client->data)->current_surface; + + switch (dstblt->bRop) { + + /* Blackness */ + case 0: + + /* Send black rectangle */ + guac_protocol_send_rect(client->socket, + GUAC_COMP_OVER, current_layer, + dstblt->nLeftRect, dstblt->nTopRect, + dstblt->nWidth, dstblt->nHeight, + 0, 0, 0, 255); + break; + + /* Unsupported ROP3 */ + default: + guac_client_log_info(client, + "guac_rdp_gdi_dstblt(rop3=%i)", dstblt->bRop); + + } + + + } void guac_rdp_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt) {