GUACAMOLE-1196: Add option to disable display resizing.
This commit is contained in:
parent
667343aff3
commit
a608928ea6
@ -38,6 +38,7 @@ const char* GUAC_VNC_CLIENT_ARGS[] = {
|
||||
"hostname",
|
||||
"port",
|
||||
"read-only",
|
||||
"disable-display-resize",
|
||||
"encodings",
|
||||
GUAC_VNC_ARGV_USERNAME,
|
||||
GUAC_VNC_ARGV_PASSWORD,
|
||||
@ -119,6 +120,13 @@ enum VNC_ARGS_IDX {
|
||||
*/
|
||||
IDX_READ_ONLY,
|
||||
|
||||
/**
|
||||
* "true" if the VNC client should disable attempts to resize the remote
|
||||
* display to the client's size, "false" or blank if those resize messages
|
||||
* should be sent.
|
||||
*/
|
||||
IDX_DISABLE_DISPLAY_RESIZE,
|
||||
|
||||
/**
|
||||
* Space-separated list of encodings to use within the VNC session. If not
|
||||
* specified, this will be:
|
||||
@ -469,6 +477,11 @@ guac_vnc_settings* guac_vnc_parse_args(guac_user* user,
|
||||
guac_user_parse_args_boolean(user, GUAC_VNC_CLIENT_ARGS, argv,
|
||||
IDX_DISABLE_SERVER_INPUT, false);
|
||||
|
||||
/* Disable display resize */
|
||||
settings->disable_display_resize =
|
||||
guac_user_parse_args_boolean(user, GUAC_VNC_CLIENT_ARGS, argv,
|
||||
IDX_DISABLE_DISPLAY_RESIZE, false);
|
||||
|
||||
/* Parse color depth */
|
||||
settings->color_depth =
|
||||
guac_user_parse_args_int(user, GUAC_VNC_CLIENT_ARGS, argv,
|
||||
|
||||
@ -54,6 +54,12 @@ typedef struct guac_vnc_settings {
|
||||
*/
|
||||
char* password;
|
||||
|
||||
/**
|
||||
* Disable the VNC client messages to request that the remote (server)
|
||||
* display resize to match the client resolution.
|
||||
*/
|
||||
bool disable_display_resize;
|
||||
|
||||
/**
|
||||
* Space-separated list of encodings to use within the VNC session.
|
||||
*/
|
||||
|
||||
@ -92,7 +92,7 @@ int guac_vnc_user_join_handler(guac_user* user, int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
/* If user is owner, set size handler. */
|
||||
if (user->owner)
|
||||
if (user->owner && !settings->disable_display_resize)
|
||||
user->size_handler = guac_vnc_user_size_handler;
|
||||
|
||||
}
|
||||
|
||||
@ -510,7 +510,8 @@ void* guac_vnc_client_thread(void* data) {
|
||||
}
|
||||
|
||||
/* Update the display with the owner's screen size. */
|
||||
guac_client_for_owner(client, guac_vnc_display_set_owner_size, rfb_client);
|
||||
if (!settings->disable_display_resize)
|
||||
guac_client_for_owner(client, guac_vnc_display_set_owner_size, rfb_client);
|
||||
|
||||
guac_socket_flush(client->socket);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user