diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index a1212c4a9..e2b8d9c99 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -810,11 +810,13 @@ gfx_wiretosurface1(struct xrdp_encoder *self, in_uint16_le(in_s, height); twidth = width; theight = height; - dst_rect.x1 = left; - dst_rect.y1 = top; - dst_rect.x2 = left + width; - dst_rect.y2 = top + height; - + dst_rect.x1 = 0; + dst_rect.y1 = 0; + dst_rect.x2 = width; + dst_rect.y2 = height; + LOG_DEVEL(LOG_LEVEL_INFO, "gfx_wiretosurface1: left %d top " + "%d width %d height %d mon_index %d", + left, top, width, height, mon_index); /* RFX_AVC420_METABLOCK */ if (out_RFX_AVC420_METABLOCK(&dst_rect, s, d_rects, num_rects_d) != 0) { @@ -857,8 +859,8 @@ gfx_wiretosurface1(struct xrdp_encoder *self, } error = xrdp_encoder_x264_encode( self->codec_handle_h264_gfx[mon_index], 0, - left, top, - width, height, twidth, theight, 0, + 0, 0, + width, height, twidth, theight, 0, enc_gfx_cmd->data, crects, num_rects_c, s->p, &bitmap_data_length, NULL); @@ -994,6 +996,9 @@ gfx_wiretosurface2(struct xrdp_encoder *self, in_uint16_le(in_s, top); in_uint16_le(in_s, width); in_uint16_le(in_s, height); + LOG_DEVEL(LOG_LEVEL_INFO, "gfx_wiretosurface2: left %d top " + "%d width %d height %d mon_index %d", + left, top, width, height, mon_index); if (self->codec_handle_prfx_gfx[mon_index] == NULL) { self->codec_handle_prfx_gfx[mon_index] = rfxcodec_encode_create(