From 2be151b32855802848e32634b02c169c2b963a26 Mon Sep 17 00:00:00 2001 From: Cendio Date: Tue, 5 Dec 2017 11:05:34 +0100 Subject: [PATCH] Always call XRRUpdateConfiguration on root window resize This fixes a problem where HeightOfScreen and WidthOfScreen returned old, incorrect sizes after the root window was resized while rdesktop was not in fullscreen. Calling XRRUpdateConfiguration ensures that the HeightOfScreen and WidthOfScreen macros return the proper values. Signed-off-by: Henrik Andersson Signed-off-by: Karl Mikaelsson Signed-off-by: Thomas Nilefalk --- xwin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xwin.c b/xwin.c index e9b8b0f..3cd8092 100644 --- a/xwin.c +++ b/xwin.c @@ -2811,14 +2811,15 @@ xwin_process_events(void) "xwin_process_events(), ConfigureNotify: Root window changed to %dx%d", xevent.xconfigure.width, xevent.xconfigure.height); - XRRUpdateConfiguration(&xevent); - XSync(g_display, False); gettimeofday(&g_resize_timer, NULL); g_pending_resize = True; } } + XRRUpdateConfiguration(&xevent); + XSync(g_display, False); + } else #endif if (xevent.xconfigure.window == g_wnd && !g_seamless_rdp && is_g_wnd_mapped)