diff --git a/client/X11/xf_gdi.c b/client/X11/xf_gdi.c index 2140a2c25..6c8827baf 100644 --- a/client/X11/xf_gdi.c +++ b/client/X11/xf_gdi.c @@ -1018,7 +1018,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context, if (!nsc_process_message(context->codecs->nsc, cmd->bpp, cmd->width, cmd->height, cmd->bitmapData, cmd->bitmapDataLength, - xfc->bitmap_buffer, gdi->dstFormat, 0, 0, 0, cmd->width, cmd->height)) + gdi->primary_buffer, gdi->dstFormat, 0, 0, 0, cmd->width, cmd->height)) { xf_unlock_x11(xfc, FALSE); return FALSE; @@ -1026,8 +1026,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context, XSetFunction(xfc->display, xfc->gc, GXcopy); XSetFillStyle(xfc->display, xfc->gc, FillSolid); - pSrcData = context->codecs->nsc->BitmapData; - pDstData = xfc->bitmap_buffer; + pDstData = gdi->primary_buffer; image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0, (char*) pDstData, cmd->width, cmd->height, xfc->scanline_pad, 0); XPutImage(xfc->display, xfc->primary, xfc->gc, image, 0, 0, @@ -1042,7 +1041,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context, XSetFunction(xfc->display, xfc->gc, GXcopy); XSetFillStyle(xfc->display, xfc->gc, FillSolid); pSrcData = cmd->bitmapData; - pDstData = xfc->bitmap_buffer; + pDstData = gdi->primary_buffer; freerdp_image_copy(pDstData, gdi->dstFormat, 0, 0, 0, cmd->width, cmd->height, pSrcData, PIXEL_FORMAT_BGRX32_VF, 0, 0, 0, &xfc->context.gdi->palette); diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c index 487aaf299..52388108f 100644 --- a/libfreerdp/codec/nsc.c +++ b/libfreerdp/codec/nsc.c @@ -407,7 +407,7 @@ BOOL nsc_process_message(NSC_CONTEXT* context, UINT16 bpp, if (!freerdp_image_copy(pDstData, DstFormat, nDstStride, nXDst, nYDst, width, height, context->BitmapData, - PIXEL_FORMAT_BGRA32, 0, 0, 0, NULL)) + PIXEL_FORMAT_BGRX32_VF, 0, 0, 0, NULL)) return FALSE; return TRUE; diff --git a/libfreerdp/gdi/gdi.c b/libfreerdp/gdi/gdi.c index 7d638ff6b..c72ca46d8 100644 --- a/libfreerdp/gdi/gdi.c +++ b/libfreerdp/gdi/gdi.c @@ -1060,6 +1060,12 @@ static BOOL gdi_surface_bits(rdpContext* context, break; } + if (!gdi_InvalidateRegion(gdi->primary->hdc, cmd->destLeft, cmd->destTop, cmd->width, cmd->height)) + { + WLog_ERR(TAG, "Failed to update invalid region"); + return FALSE; + } + return TRUE; }