From 8ef9f39aa815968caf39de8a549956f3d88726e5 Mon Sep 17 00:00:00 2001 From: Cendio Date: Wed, 10 Jan 2018 12:21:25 +0100 Subject: [PATCH] Avoid fight about requested session size upon disconnect/reconnect resize. Move ui_init_connection() outside main loop since it is the source for the fight of requested session size after a resize reconnect. This should only be called once for setting up initial requested session size via command line args. Signed-off-by: Henrik Andersson Signed-off-by: Thomas Nilefalk --- rdesktop.c | 3 ++- xwin.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rdesktop.c b/rdesktop.c index f6c647c..be7f157 100644 --- a/rdesktop.c +++ b/rdesktop.c @@ -853,6 +853,7 @@ main(int argc, char *argv[]) break; case 'f': + g_window_size_type = Fullscreen; g_fullscreen = True; break; @@ -1296,6 +1297,7 @@ main(int argc, char *argv[]) dvc_init(); rdpedisp_init(); + ui_init_connection(); g_reconnect_loop = False; while (1) @@ -1320,7 +1322,6 @@ main(int argc, char *argv[]) g_network_error = False; } - ui_init_connection(); utils_apply_session_size_limitations(&g_initial_width, &g_initial_height); if (!rdp_connect diff --git a/xwin.c b/xwin.c index 3eeffd8..a0050a7 100644 --- a/xwin.c +++ b/xwin.c @@ -1971,7 +1971,7 @@ ui_init_connection(void) /* * Determine desktop size */ - if (g_fullscreen || g_window_size_type == Fullscreen) + if (g_window_size_type == Fullscreen) { g_initial_width = WidthOfScreen(g_screen); g_initial_height = HeightOfScreen(g_screen);