From ed3a1113f58173673bcf1d2b2ea2aa0559ba1142 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Sat, 25 Nov 2023 20:39:52 +0100 Subject: [PATCH] [client,x11] fix monitor detection --- client/X11/xf_client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index db69f5d10..61fc1910a 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -1202,9 +1202,11 @@ static BOOL xf_pre_connect(freerdp* instance) { if (!xf_keyboard_init(xfc)) return FALSE; - - xf_detect_monitors(xfc, &maxWidth, &maxHeight); } + + if (!xf_detect_monitors(xfc, &maxWidth, &maxHeight)) + return FALSE; + if (maxWidth && maxHeight && !freerdp_settings_get_bool(settings, FreeRDP_SmartSizing)) { if (!freerdp_settings_set_uint32(settings, FreeRDP_DesktopWidth, maxWidth))