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 <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
This commit is contained in:
Cendio 2018-01-10 12:21:25 +01:00
parent ba41f749c6
commit 8ef9f39aa8
2 changed files with 3 additions and 2 deletions

View File

@ -853,6 +853,7 @@ main(int argc, char *argv[])
break; break;
case 'f': case 'f':
g_window_size_type = Fullscreen;
g_fullscreen = True; g_fullscreen = True;
break; break;
@ -1296,6 +1297,7 @@ main(int argc, char *argv[])
dvc_init(); dvc_init();
rdpedisp_init(); rdpedisp_init();
ui_init_connection();
g_reconnect_loop = False; g_reconnect_loop = False;
while (1) while (1)
@ -1320,7 +1322,6 @@ main(int argc, char *argv[])
g_network_error = False; g_network_error = False;
} }
ui_init_connection();
utils_apply_session_size_limitations(&g_initial_width, &g_initial_height); utils_apply_session_size_limitations(&g_initial_width, &g_initial_height);
if (!rdp_connect if (!rdp_connect

2
xwin.c
View File

@ -1971,7 +1971,7 @@ ui_init_connection(void)
/* /*
* Determine desktop size * 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_width = WidthOfScreen(g_screen);
g_initial_height = HeightOfScreen(g_screen); g_initial_height = HeightOfScreen(g_screen);