summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCendio <cendio@pairstation.lkpg.cendio.se>2018-02-13 16:19:54 +0100
committerCendio <cendio@pairstation.lkpg.cendio.se>2018-02-14 10:49:39 +0100
commita0af72a33712e7c650a57ca32d941ad00abf9589 (patch)
tree9ec8f7170bf4129bfa931b708e19a64d2d2da8a4
parent8bc2cea80f7604dbbbeb63a43ca08805666b55c3 (diff)
downloadrdesktop-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.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/xwin.c b/xwin.c
index 86a3b90..6fa4343 100644
--- a/xwin.c
+++ b/xwin.c
@@ -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",