Fix X error BadAlloc when using seamlessrdp

The introduction of setting session size using percentages of both
with and height of screen like -g 50%x100%, commit 3140824be
introduced a bug when using seamless rdp. This commit fixes this bug.
This commit is contained in:
Henrik Andersson 2017-03-09 12:25:10 +01:00
parent c93960b266
commit 2c9a706c23

7
xwin.c
View File

@ -1961,6 +1961,13 @@ ui_init_connection(void)
/* Percent of screen */ /* Percent of screen */
if (-g_sizeopt >= 100) if (-g_sizeopt >= 100)
g_using_full_workarea = True; g_using_full_workarea = True;
if (g_width > 0)
g_width = g_sizeopt;
if (g_height > 0)
g_height = g_sizeopt;
g_height = HeightOfScreen(g_screen) * (-g_height) / 100; g_height = HeightOfScreen(g_screen) * (-g_height) / 100;
g_width = WidthOfScreen(g_screen) * (-g_width) / 100; g_width = WidthOfScreen(g_screen) * (-g_width) / 100;
} }