mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Merge pull request #4099 from mmeyer724/wayland-fullscreen
wlfreerdp: mirror display resolution in fullscreen mode
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user