From 36b46e63c2d1281e15f9d06bb7b27dcef9c7bc1d Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Sun, 9 Jan 2022 14:18:22 -0500 Subject: [PATCH] [WIP]: Try out remote app settings changes. --- src/protocols/rdp/channels/rail.c | 6 ++++++ src/protocols/rdp/settings.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/protocols/rdp/channels/rail.c b/src/protocols/rdp/channels/rail.c index 6f8d7f7f..95deb96f 100644 --- a/src/protocols/rdp/channels/rail.c +++ b/src/protocols/rdp/channels/rail.c @@ -97,6 +97,12 @@ static UINT guac_rdp_rail_complete_handshake(RailClientContext* rail) { .flags = 0x00 }; + client_status.flags |= TS_RAIL_CLIENTSTATUS_ZORDER_SYNC; + client_status.flags |= TS_RAIL_CLIENTSTATUS_WINDOW_RESIZE_MARGIN_SUPPORTED; + client_status.flags |= TS_RAIL_CLIENTSTATUS_APPBAR_REMOTING_SUPPORTED; + client_status.flags |= TS_RAIL_CLIENTSTATUS_POWER_DISPLAY_REQUEST_SUPPORTED; + client_status.flags |= TS_RAIL_CLIENTSTATUS_BIDIRECTIONAL_CLOAK_SUPPORTED; + /* Send client status */ pthread_mutex_lock(&(rdp_client->message_lock)); status = rail->ClientInformation(rail, &client_status); diff --git a/src/protocols/rdp/settings.c b/src/protocols/rdp/settings.c index 81dfedf9..37d4c577 100644 --- a/src/protocols/rdp/settings.c +++ b/src/protocols/rdp/settings.c @@ -1509,8 +1509,12 @@ void guac_rdp_push_settings(guac_client* client, rdp_settings->RemoteApplicationMode = TRUE; rdp_settings->RemoteAppLanguageBarSupported = TRUE; rdp_settings->RemoteApplicationProgram = guac_strdup(guac_settings->remote_app); - rdp_settings->ShellWorkingDirectory = guac_strdup(guac_settings->remote_app_dir); + if (guac_settings->remote_app_dir != NULL) + rdp_settings->RemoteApplicationWorkingDir = guac_strdup(guac_settings->remote_app_dir); rdp_settings->RemoteApplicationCmdLine = guac_strdup(guac_settings->remote_app_args); + rdp_settings->DisableWallpaper = TRUE; + rdp_settings->DisableFullWindowDrag = TRUE; + rdp_settings->Decorations = TRUE; } /* Preconnection ID */ @@ -1556,7 +1560,7 @@ void guac_rdp_push_settings(guac_client* client, rdp_settings->GlyphSupportLevel = !guac_settings->disable_glyph_caching ? GLYPH_SUPPORT_FULL : GLYPH_SUPPORT_NONE; rdp_settings->OsMajorType = OSMAJORTYPE_UNSPECIFIED; rdp_settings->OsMinorType = OSMINORTYPE_UNSPECIFIED; - rdp_settings->DesktopResize = TRUE; + rdp_settings->DesktopResize = FALSE; /* Claim support only for specific updates, independent of FreeRDP defaults */ ZeroMemory(rdp_settings->OrderSupport, GUAC_RDP_ORDER_SUPPORT_LENGTH);