-g 70%x90%

This commit is contained in:
remijouannet 2016-05-24 17:47:03 +02:00
parent 2140da0c3f
commit 3140824be3
3 changed files with 11 additions and 4 deletions

View File

@ -66,7 +66,7 @@ so its use is discouraged.
Desktop geometry (WxH). If geometry is the special word "workarea", the geometry
will be fetched from the extended window manager hints property _NET_WORKAREA, from
the root window. The geometry can also be specified as a percentage of the whole
screen, e.g. "-g 80%".
screen, e.g. "-g 80%", "-g 80%x70%".
If the specified geometry depends on the screen size, and the screen
size is changed, rdesktop will automatically reconnect using the new

View File

@ -682,7 +682,14 @@ main(int argc, char *argv[])
if (*p == '%')
{
g_sizeopt = -g_width;
g_width = 800;
g_width = g_sizeopt;
if (*(p + 1) == 'x'){
g_height = -strtol(p + 2, &p, 10);
}else{
g_height = g_sizeopt;
}
p++;
}

4
xwin.c
View File

@ -1953,8 +1953,8 @@ ui_init_connection(void)
/* Percent of screen */
if (-g_sizeopt >= 100)
g_using_full_workarea = True;
g_height = HeightOfScreen(g_screen) * (-g_sizeopt) / 100;
g_width = WidthOfScreen(g_screen) * (-g_sizeopt) / 100;
g_height = HeightOfScreen(g_screen) * (-g_height) / 100;
g_width = WidthOfScreen(g_screen) * (-g_width) / 100;
}
else if (g_sizeopt == 1)
{