From a6d82619ee7ef5c1853869e56315e80a10d76f9b Mon Sep 17 00:00:00 2001 From: Cendio Date: Thu, 11 Jan 2018 15:00:46 +0100 Subject: [PATCH] Fix regression introduced in commit 85c10b5 There was either an X11 BadMatch error crash or the rdesktop main window disappeared when toggling from window to fullscreen. The bug is consitently reproducible but only on some systems, maybe this is a X11 version dependent bug. Move back to old beahavior were we destroy and recreate the window when toggling between fullscreen and windowed mode. Signed-off-by: Henrik Andersson --- xwin.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/xwin.c b/xwin.c index 07e4932..c538ed9 100644 --- a/xwin.c +++ b/xwin.c @@ -2287,8 +2287,6 @@ xwin_toggle_fullscreen(void) { uint32 x, y, width, height; XWindowAttributes attr; - XSetWindowAttributes setattr; - unsigned long value_mask; Pixmap contents = 0; Window unused; int dest_x, dest_y; @@ -2347,14 +2345,10 @@ xwin_toggle_fullscreen(void) } /* Resize rdesktop window using new size and window attributes */ - XUnmapWindow(g_display, g_wnd); - - XMoveResizeWindow(g_display, g_wnd, x, y, width, height); - - value_mask = get_window_attribs(&setattr); - XChangeWindowAttributes(g_display, g_wnd, value_mask, &setattr); - - XMapWindow(g_display, g_wnd); + g_xpos = x; + g_ypos = y; + ui_destroy_window(); + ui_create_window(width, height); /* Change session size to match new window size */ if (rdpedisp_is_available() == False)