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>
This commit is contained in:
parent
8bc2cea80f
commit
a0af72a337
13
xwin.c
13
xwin.c
@ -2359,12 +2359,23 @@ xwin_toggle_fullscreen(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Restore "old" window size */
|
/* Switch from fullscreen to window mode */
|
||||||
x = windowed_x;
|
x = windowed_x;
|
||||||
y = windowed_y;
|
y = windowed_y;
|
||||||
|
|
||||||
|
if (g_dynamic_session_resize)
|
||||||
|
{
|
||||||
|
/* Restore "old" window size, resize session to fit */
|
||||||
width = windowed_width;
|
width = windowed_width;
|
||||||
height = windowed_height;
|
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",
|
logger(GUI, Debug, "xwin_toggle_fullscreen(), new window: %dx%d+%d+%d, last window: %dx%d",
|
||||||
width, height, x, y, windowed_width, windowed_height);
|
width, height, x, y, windowed_width, windowed_height);
|
||||||
|
Loading…
Reference in New Issue
Block a user