multimon fixes

(cherry picked from commit 96ff6fdba8)
This commit is contained in:
Jay Sorg 2024-05-14 14:19:53 -07:00 committed by Koichiro Iwao
parent 9cb2afa052
commit 48a6cd4060

View File

@ -859,11 +859,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)
{
@ -906,8 +908,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);
@ -1043,6 +1045,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(