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 <hean01@cendio.com>
This commit is contained in:
Cendio 2018-01-11 15:00:46 +01:00
parent 1f3d1fb3e0
commit a6d82619ee

14
xwin.c
View File

@ -2287,8 +2287,6 @@ xwin_toggle_fullscreen(void)
{ {
uint32 x, y, width, height; uint32 x, y, width, height;
XWindowAttributes attr; XWindowAttributes attr;
XSetWindowAttributes setattr;
unsigned long value_mask;
Pixmap contents = 0; Pixmap contents = 0;
Window unused; Window unused;
int dest_x, dest_y; int dest_x, dest_y;
@ -2347,14 +2345,10 @@ xwin_toggle_fullscreen(void)
} }
/* Resize rdesktop window using new size and window attributes */ /* Resize rdesktop window using new size and window attributes */
XUnmapWindow(g_display, g_wnd); g_xpos = x;
g_ypos = y;
XMoveResizeWindow(g_display, g_wnd, x, y, width, height); ui_destroy_window();
ui_create_window(width, height);
value_mask = get_window_attribs(&setattr);
XChangeWindowAttributes(g_display, g_wnd, value_mask, &setattr);
XMapWindow(g_display, g_wnd);
/* Change session size to match new window size */ /* Change session size to match new window size */
if (rdpedisp_is_available() == False) if (rdpedisp_is_available() == False)