- if (bitmap->layer != NULL)
- guac_protocol_send_copy(socket,
- bitmap->layer,
- memblt->nXSrc, memblt->nYSrc, memblt->nWidth, memblt->nHeight,
- guac_rdp_rop3_composite_mode(client, memblt->bRop),
- current_layer, memblt->nLeftRect, memblt->nTopRect);
+ if (bitmap->layer != NULL) {
+
+ /* If operation is just SRC, simply copy */
+ if (memblt->bRop == 0xCC)
+ guac_protocol_send_copy(socket,
+ bitmap->layer,
+ memblt->nXSrc, memblt->nYSrc,
+ memblt->nWidth, memblt->nHeight,
+ GUAC_COMP_OVER,
+ current_layer, memblt->nLeftRect, memblt->nTopRect);
+
+ /* Otherwise, use transfer */
+ else
+ guac_protocol_send_transfer(socket,
+ bitmap->layer,
+ memblt->nXSrc, memblt->nYSrc,
+ memblt->nWidth, memblt->nHeight,
+ guac_rdp_rop3_transfer_function(client, memblt->bRop),
+ current_layer, memblt->nLeftRect, memblt->nTopRect);
+
+ }