diff options
author | Cendio <cendio@pairstation.lkpg.cendio.se> | 2018-02-13 16:19:54 +0100 |
---|---|---|
committer | Cendio <cendio@pairstation.lkpg.cendio.se> | 2018-02-14 10:49:39 +0100 |
commit | a0af72a33712e7c650a57ca32d941ad00abf9589 (patch) | |
tree | 9ec8f7170bf4129bfa931b708e19a64d2d2da8a4 | |
parent | 8bc2cea80f7604dbbbeb63a43ca08805666b55c3 (diff) | |
download | rdesktop-a0af72a33712e7c650a57ca32d941ad00abf9589.zip |
Fix fullscreen toggle when dynamic session resize is disabled
When dynamic session resize is disabled, leaving fullscreen should
result in a window that matches the session size.
Co-authored-by: Henrik Andersson <hean01@cendio.com>
Co-authored-by: Karl Mikaelsson <derfian@cendio.se>
-rw-r--r-- | xwin.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -2359,11 +2359,22 @@ xwin_toggle_fullscreen(void) } else { - /* Restore "old" window size */ + /* Switch from fullscreen to window mode */ x = windowed_x; y = windowed_y; - width = windowed_width; - height = windowed_height; + + if (g_dynamic_session_resize) + { + /* Restore "old" window size, resize session to fit */ + width = windowed_width; + height = windowed_height; + } + else + { + /* Resize window to fit session size */ + width = g_session_width; + height = g_session_height; + } } logger(GUI, Debug, "xwin_toggle_fullscreen(), new window: %dx%d+%d+%d, last window: %dx%d", |