[client,common] fix clipboard command line

allow both, +/- and /clipboard style options.
This commit is contained in:
akallabeth
2024-01-23 08:36:20 +01:00
committed by akallabeth
parent cefe847683
commit 902832ca76
2 changed files with 14 additions and 5 deletions

View File

@@ -471,8 +471,17 @@ static void freerdp_client_print_command_line_args(COMMAND_LINE_ARGUMENT_A* parg
size_t pos = 0;
const size_t description_offset = 30 + 8;
if (arg->Flags & COMMAND_LINE_VALUE_BOOL)
rc = printf(" %s%s", arg->Default ? "-" : "+", arg->Name);
if (arg->Flags & (COMMAND_LINE_VALUE_BOOL | COMMAND_LINE_VALUE_FLAG))
{
if ((arg->Flags & ~COMMAND_LINE_VALUE_BOOL) == 0)
rc = printf(" %s%s", arg->Default ? "-" : "+", arg->Name);
else if ((arg->Flags & COMMAND_LINE_VALUE_OPTIONAL) != 0)
rc = printf(" [%s|/]%s", arg->Default ? "-" : "+", arg->Name);
else
{
rc = printf(" %s%s", arg->Default ? "-" : "+", arg->Name);
}
}
else
rc = printf(" /%s", arg->Name);

View File

@@ -119,10 +119,10 @@ static const COMMAND_LINE_ARGUMENT_A global_cmd_args[] = {
"Client Build Number sent to server (influences smartcard behaviour, see [MS-RDPESC])" },
{ "client-hostname", COMMAND_LINE_VALUE_REQUIRED, "<name>", NULL, NULL, -1, NULL,
"Client Hostname to send to server" },
{ "clipboard", COMMAND_LINE_VALUE_OPTIONAL,
{ "clipboard", COMMAND_LINE_VALUE_BOOL | COMMAND_LINE_VALUE_OPTIONAL,
"[[use-selection:<atom>],[direction-to:[all|local|remote|off]],[files-to[:all|local|remote|"
"off]]],",
NULL, NULL, -1, NULL,
"off]]]",
BoolValueTrue, NULL, -1, NULL,
"Redirect clipboard:\n"
" * use-selection:<atom> ... (X11) Specify which X selection to access. Default is "
"CLIPBOARD. PRIMARY is the X-style middle-click selection.\n"