[settings] replace XSelectionAtom
the common command line parser should not touch unstable API settings, so use newly introduced FreeRDP_ClipboardUseSelection
This commit is contained in:
parent
4d99b4ff9b
commit
229916d02e
@ -2250,9 +2250,12 @@ xfClipboard* xf_clipboard_new(xfContext* xfc, BOOL relieveFilenameRestriction)
|
||||
clipboard->system = ClipboardCreate();
|
||||
clipboard->requestedFormatId = -1;
|
||||
clipboard->root_window = DefaultRootWindow(xfc->display);
|
||||
selectionAtom = "CLIPBOARD";
|
||||
if (xfc->common.context.settings->XSelectionAtom)
|
||||
selectionAtom = xfc->common.context.settings->XSelectionAtom;
|
||||
|
||||
selectionAtom =
|
||||
freerdp_settings_get_string(xfc->common.context.settings, FreeRDP_ClipboardUseSelection);
|
||||
if (!selectionAtom)
|
||||
selectionAtom = "CLIPBOARD";
|
||||
|
||||
clipboard->clipboard_atom = XInternAtom(xfc->display, selectionAtom, FALSE);
|
||||
|
||||
if (clipboard->clipboard_atom == None)
|
||||
|
@ -3477,7 +3477,8 @@ static int freerdp_client_settings_parse_command_line_arguments_int(rdpSettings*
|
||||
if (option_starts_with(usesel, cur))
|
||||
{
|
||||
const char* val = &cur[strlen(usesel)];
|
||||
if (!copy_value(val, &settings->XSelectionAtom))
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_ClipboardUseSelection,
|
||||
val))
|
||||
rc = COMMAND_LINE_ERROR_MEMORY;
|
||||
settings->RedirectClipboard = TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user