From 8b367f2fcc4ff9c990812ebbfafe6a393fb7eb5d 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) --- src/rdp_gdi.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/rdp_gdi.c b/src/rdp_gdi.c index 8ec80a0..4159d77 100644 --- a/src/rdp_gdi.c +++ b/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) { -- 1.7.10.4