From e695645a7939652758137454c40a00498b5e1909 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Thu, 17 Aug 2017 13:33:44 -0400 Subject: [PATCH] wlfreerdp: mirror display resolution in fullscreen mode --- client/Wayland/wlfreerdp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/client/Wayland/wlfreerdp.c b/client/Wayland/wlfreerdp.c index 4dccc37e9..7d6f2aaf8 100644 --- a/client/Wayland/wlfreerdp.c +++ b/client/Wayland/wlfreerdp.c @@ -103,6 +103,8 @@ static BOOL wl_pre_connect(freerdp* instance) { rdpSettings* settings; wlfContext* context; + UwacOutput *output; + UwacSize resolution; if (!instance) return FALSE; @@ -146,6 +148,21 @@ static BOOL wl_pre_connect(freerdp* instance) PubSub_SubscribeChannelDisconnected(instance->context->pubSub, (pChannelDisconnectedEventHandler) wlf_OnChannelDisconnectedEventHandler); + if (settings->Fullscreen) + { + // Use the resolution of the first display output + output = UwacDisplayGetOutput(context->display, 1); + if (output != NULL && UwacOutputGetResolution(output, &resolution) == UWAC_SUCCESS) + { + settings->DesktopWidth = (UINT32) resolution.width; + settings->DesktopHeight = (UINT32) resolution.height; + } + else + { + WLog_WARN(TAG, "Failed to get output resolution! Check your display settings"); + } + } + if (!freerdp_client_load_addins(instance->context->channels, instance->settings)) return FALSE;