summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-03-28 16:38:55 +0200
committerPierre Ossman <ossman@cendio.se>2018-03-28 16:38:55 +0200
commit2fb1fd610f097a285f060761199df1a6eeb1f7d6 (patch)
treec7fda9b7b2ddf5e7d6463ee9634359ac391a2c0f
parenta0bf290ea2b8940e06494bd9da54a1f9a7db7940 (diff)
downloadrdesktop-2fb1fd610f097a285f060761199df1a6eeb1f7d6.zip
Update requested session size with RDPEDISP
We need to track the desired session size even if we can resize without a reconnect. Otherwise we will request the wrong size in the event we need to reconnect for another reason (e.g. network problems).
-rw-r--r--xwin.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/xwin.c b/xwin.c
index 5fcd99d..53681e4 100644
--- a/xwin.c
+++ b/xwin.c
@@ -3051,7 +3051,6 @@ timeval_is_set(struct timeval *time)
static RD_BOOL
process_pending_resize ()
{
- uint32 width, height;
time_t now_ts;
struct timeval now;
@@ -3093,8 +3092,8 @@ process_pending_resize ()
if (g_fullscreen || g_seamless_rdp)
{
/* follow root window size */
- width = WidthOfScreen(g_screen);
- height = HeightOfScreen(g_screen);
+ g_requested_session_width = WidthOfScreen(g_screen);
+ g_requested_session_height = HeightOfScreen(g_screen);
if (g_window_size_type == PercentageOfScreen)
{
/* TODO: Implement percentage of screen */
@@ -3103,8 +3102,8 @@ process_pending_resize ()
else
{
/* Follow window size */
- width = g_window_width;
- height = g_window_height;
+ g_requested_session_width = g_window_width;
+ g_requested_session_height = g_window_height;
}
@@ -3116,9 +3115,6 @@ process_pending_resize ()
* server by returning to outer loop.
*/
- g_requested_session_width = width;
- g_requested_session_height = height;
-
logger(GUI, Verbose, "Window resize detected, reconnecting to new size %dx%d",
g_requested_session_width,
g_requested_session_height);
@@ -3132,9 +3128,11 @@ process_pending_resize ()
return False;
logger(GUI, Verbose, "Window resize detected, requesting matching session size %dx%d",
- width, height);
+ g_requested_session_width,
+ g_requested_session_height);
- rdpedisp_set_session_size(width, height);
+ rdpedisp_set_session_size(g_requested_session_width,
+ g_requested_session_height);
g_pending_resize = False;
g_wait_for_deactivate_ts = now_ts;