Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions src/protocols/rdp/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ const char* GUAC_RDP_CLIENT_ARGS[] = {

"force-lossless",
"normalize-clipboard",

"disable-fast-path-input",
"disable-fast-path-output",
NULL
};

Expand Down Expand Up @@ -722,6 +725,22 @@ enum RDP_ARGS_IDX {
*/
IDX_NORMALIZE_CLIPBOARD,

/**
* "true" if the RDP fast-path input mechanism should be disabled, forcing
* all input events to be sent to the RDP server using slow-path (standard)
* input Protocol Data Units (PDUs), "false" or blank otherwise. By
* default, fast-path input is used if the RDP server supports it.
*/
IDX_DISABLE_FAST_PATH_INPUT,

/**
* "true" if support for the RDP fast-path output mechanism should not be
* advertised to the RDP server, requesting that all graphical updates be
* sent using slow-path (standard) update PDUs, "false" or blank otherwise.
* By default, support for fast-path output is advertised.
*/
IDX_DISABLE_FAST_PATH_OUTPUT,

RDP_ARGS_COUNT
};

Expand Down Expand Up @@ -984,6 +1003,14 @@ guac_rdp_settings* guac_rdp_parse_args(guac_user* user,
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DISABLE_OFFSCREEN_CACHING, 0);

settings->disable_fast_path_input =
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DISABLE_FAST_PATH_INPUT, 0);

settings->disable_fast_path_output =
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_DISABLE_FAST_PATH_OUTPUT, 0);

/* FreeRDP does not consider the glyph cache implementation to be stable as
* of 2.0.0, and it MUST NOT be used. Usage of the glyph cache results in
* unexpected disconnects when using older versions of Windows and recent
Expand Down Expand Up @@ -1535,8 +1562,11 @@ void guac_rdp_push_settings(guac_client* client,
freerdp_settings_set_bool(rdp_settings, FreeRDP_FrameMarkerCommandEnabled, TRUE);
freerdp_settings_set_bool(rdp_settings, FreeRDP_SurfaceFrameMarkerEnabled, TRUE);

freerdp_settings_set_bool(rdp_settings, FreeRDP_FastPathInput, TRUE);
freerdp_settings_set_bool(rdp_settings, FreeRDP_FastPathOutput, TRUE);
/* Use fast-path input/output unless explicitly disabled */
freerdp_settings_set_bool(rdp_settings, FreeRDP_FastPathInput,
!guac_settings->disable_fast_path_input);
freerdp_settings_set_bool(rdp_settings, FreeRDP_FastPathOutput,
!guac_settings->disable_fast_path_output);

/* Enable RemoteFX / Graphics Pipeline */
if (guac_settings->enable_gfx) {
Expand Down Expand Up @@ -1770,8 +1800,9 @@ void guac_rdp_push_settings(guac_client* client,
rdp_settings->FrameMarkerCommandEnabled = TRUE;
rdp_settings->SurfaceFrameMarkerEnabled = TRUE;

rdp_settings->FastPathInput = TRUE;
rdp_settings->FastPathOutput = TRUE;
/* Use fast-path input/output unless explicitly disabled */
rdp_settings->FastPathInput = !guac_settings->disable_fast_path_input;
rdp_settings->FastPathOutput = !guac_settings->disable_fast_path_output;

/* Enable RemoteFX / Graphics Pipeline */
if (guac_settings->enable_gfx) {
Expand Down
14 changes: 14 additions & 0 deletions src/protocols/rdp/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,20 @@ typedef struct guac_rdp_settings {
*/
int disable_glyph_caching;

/**
* Whether the RDP fast-path input mechanism should be disabled, forcing
* all input events to be sent to the RDP server using slow-path (standard)
* input Protocol Data Units (PDUs).
*/
int disable_fast_path_input;

/**
* Whether support for the RDP fast-path output mechanism should not be
* advertised to the RDP server, requesting that all graphical updates be
* sent using slow-path (standard) update PDUs.
*/
int disable_fast_path_output;

/**
* The preconnection ID to send within the preconnection PDU when
* initiating an RDP connection, if any. If no preconnection ID is
Expand Down
Loading