rdp: Use the first output in rdp_peer_refresh_region

Currently, this is what backend->output would be anyway. This is another
step towards removing the singleton output stored in the backend.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-08-03 09:45:30 -05:00 committed by Daniel Stone
parent 0d06d709d6
commit 00de8ceff7

View File

@ -53,6 +53,21 @@
extern PWtsApiFunctionTable FreeRDP_InitWtsApi(void);
static struct rdp_output *
rdp_get_first_output(struct rdp_backend *b)
{
struct weston_output *output;
struct rdp_output *rdp_output;
wl_list_for_each(output, &b->compositor->output_list, link) {
rdp_output = to_rdp_output(output);
if (rdp_output)
return rdp_output;
}
return NULL;
}
static void
rdp_peer_refresh_rfx(pixman_region32_t *damage, pixman_image_t *image, freerdp_peer *peer)
{
@ -226,7 +241,7 @@ static void
rdp_peer_refresh_region(pixman_region32_t *region, freerdp_peer *peer)
{
RdpPeerContext *context = (RdpPeerContext *)peer->context;
struct rdp_output *output = context->rdpBackend->output;
struct rdp_output *output = rdp_get_first_output(context->rdpBackend);
rdpSettings *settings = peer->context->settings;
if (settings->RemoteFxCodec)