clipboard: implement file clipping on XP.
add temp directory. use %TEMP% directory as file transfering temprorary directory. if %TEMP% directory is in C:\, driver C:\ should be redirected in order to enable file clipping on XP.
This commit is contained in:
parent
353b4f8ba3
commit
edd3bff950
@ -363,7 +363,14 @@ static void cliprdr_process_unlock_clipdata_event(cliprdrPlugin* plugin, RDP_CB_
|
||||
|
||||
static void cliprdr_process_tempdir_event(cliprdrPlugin* plugin, RDP_CB_TEMPDIR_EVENT * event)
|
||||
{
|
||||
wStream* s;
|
||||
|
||||
DEBUG_CLIPRDR("Sending Temporary Directory.");
|
||||
s = cliprdr_packet_new(CB_TEMP_DIRECTORY, 0, 520);
|
||||
|
||||
Stream_Write(s, event->dirname, 520);
|
||||
|
||||
cliprdr_packet_send(plugin, s);
|
||||
}
|
||||
|
||||
static void cliprdr_process_event(rdpSvcPlugin* plugin, wMessage* event)
|
||||
|
@ -118,6 +118,21 @@ static void clear_format_map(cliprdrContext *cliprdr)
|
||||
cliprdr->map_size= 0;
|
||||
}
|
||||
|
||||
int cliprdr_send_tempdir(cliprdrContext *cliprdr)
|
||||
{
|
||||
RDP_CB_TEMPDIR_EVENT *cliprdr_event;
|
||||
|
||||
cliprdr_event = (RDP_CB_TEMPDIR_EVENT *)freerdp_event_new(CliprdrChannel_Class,
|
||||
CliprdrChannel_TemporaryDirectory, NULL, NULL);
|
||||
|
||||
if (!cliprdr_event)
|
||||
return -1;
|
||||
|
||||
GetEnvironmentVariableW(L"TEMP", (LPWSTR)cliprdr_event->dirname, 260);
|
||||
|
||||
return freerdp_channels_send_event(cliprdr->channels, (wMessage *)cliprdr_event);
|
||||
}
|
||||
|
||||
static void cliprdr_send_format_list(cliprdrContext *cliprdr)
|
||||
{
|
||||
RDP_CB_FORMAT_LIST_EVENT *cliprdr_event;
|
||||
@ -431,6 +446,8 @@ static void wf_cliprdr_process_cb_monitor_ready_event(wfContext *wfc, RDP_CB_MON
|
||||
{
|
||||
cliprdrContext *cliprdr = (cliprdrContext *)wfc->cliprdr_context;
|
||||
|
||||
cliprdr_send_tempdir(cliprdr);
|
||||
|
||||
cliprdr->channel_initialized = TRUE;
|
||||
|
||||
cliprdr_send_format_list(wfc->cliprdr_context);
|
||||
|
Loading…
Reference in New Issue
Block a user