Fullscreen windows should not be resized to match the session size

Given that a fullscreen window should have the same size as the
screen, when the server tells us a session size, then we can't
resize the fullscreen window.

Co-authored-by: Henrik Andersson <hean01@cendio.com>
Co-authored-by: Karl Mikaelsson <derfian@cendio.se>
This commit is contained in:
Cendio 2018-02-13 10:22:23 +01:00
parent ad3ed6bcf0
commit 9d163423eb
2 changed files with 13 additions and 3 deletions

11
rdp.c
View File

@ -85,6 +85,7 @@ extern RD_BOOL g_has_reconnect_random;
extern uint8 g_client_random[SEC_RANDOM_SIZE]; extern uint8 g_client_random[SEC_RANDOM_SIZE];
static uint32 g_packetno; static uint32 g_packetno;
extern RD_BOOL g_fullscreen;
/* holds the actual session size reported by server */ /* holds the actual session size reported by server */
uint16 g_session_width; uint16 g_session_width;
@ -1131,9 +1132,13 @@ rdp_process_bitmap_caps(STREAM s)
g_server_depth = depth; g_server_depth = depth;
} }
/* resize viewport window to new session size, this is an /* Resize window size to match session size, except when we're in
no-op if there is no change in size between session size fullscreen, where we want the window to always cover the entire
reported from server and the actual window size */ screen. */
if (g_fullscreen == True)
return;
ui_resize_window(g_session_width, g_session_height); ui_resize_window(g_session_width, g_session_height);
} }

5
xwin.c
View File

@ -2838,6 +2838,11 @@ xwin_process_events(void)
xevent.xconfigure.height); xevent.xconfigure.height);
gettimeofday(&g_resize_timer, NULL); gettimeofday(&g_resize_timer, NULL);
/* Resize fullscreen window to match root window size */
/* TODO: Handle percentage of screen */
if (g_fullscreen)
ui_resize_window(xevent.xconfigure.width, xevent.xconfigure.height);
g_pending_resize = True; g_pending_resize = True;
} }
} }