From 4758595e23ee426e771a75a63e7a5dcd71f5bdfa Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 22 Oct 2012 15:02:58 -0700 Subject: [PATCH] Use width/height from client if not specified in args. --- protocols/rdp/src/client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/protocols/rdp/src/client.c b/protocols/rdp/src/client.c index 11d38937..451c6b40 100644 --- a/protocols/rdp/src/client.c +++ b/protocols/rdp/src/client.c @@ -322,26 +322,26 @@ int guac_client_init(guac_client* client, int argc, char** argv) { settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS; settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; - /* Session width */ - settings->width = RDP_DEFAULT_WIDTH; + /* Use optimal width unless overridden */ + settings->width = client->info.optimal_width; if (argv[IDX_WIDTH][0] != '\0') settings->width = atoi(argv[IDX_WIDTH]); /* Use default width if given width is invalid. */ - if (settings->width == 0) { + if (settings->width <= 0) { settings->width = RDP_DEFAULT_WIDTH; guac_client_log_error(client, "Invalid width: \"%s\". Using default of %i.", argv[IDX_WIDTH], settings->width); } - /* Session height */ - settings->height = RDP_DEFAULT_HEIGHT; + /* Use optimal height unless overridden */ + settings->height = client->info.optimal_height; if (argv[IDX_HEIGHT][0] != '\0') settings->height = atoi(argv[IDX_HEIGHT]); /* Use default height if given height is invalid. */ - if (settings->height == 0) { + if (settings->height <= 0) { settings->height = RDP_DEFAULT_HEIGHT; guac_client_log_error(client, "Invalid height: \"%s\". Using default of %i.",