114 |
/* Denotes that an rdesktop (not this rdesktop) is owning the selection, |
/* Denotes that an rdesktop (not this rdesktop) is owning the selection, |
115 |
allowing us to interchange Windows native clipboard data directly. */ |
allowing us to interchange Windows native clipboard data directly. */ |
116 |
static int rdesktop_is_selection_owner = 0; |
static int rdesktop_is_selection_owner = 0; |
117 |
|
/* Time when we acquired the selection. */ |
118 |
|
static Time acquire_time = 0; |
119 |
|
|
120 |
/* Denotes that an INCR ("chunked") transfer is in progress. */ |
/* Denotes that an INCR ("chunked") transfer is in progress. */ |
121 |
static int g_waiting_for_INCR = 0; |
static int g_waiting_for_INCR = 0; |
616 |
} |
} |
617 |
else if (event->target == timestamp_atom) |
else if (event->target == timestamp_atom) |
618 |
{ |
{ |
619 |
xclip_provide_selection(event, XA_INTEGER, 32, (uint8 *) & g_last_gesturetime, 1); |
xclip_provide_selection(event, XA_INTEGER, 32, (uint8 *) & acquire_time, 1); |
620 |
return; |
return; |
621 |
} |
} |
622 |
else |
else |
800 |
void |
void |
801 |
ui_clip_format_announce(uint8 * data, uint32 length) |
ui_clip_format_announce(uint8 * data, uint32 length) |
802 |
{ |
{ |
803 |
XSetSelectionOwner(g_display, primary_atom, g_wnd, g_last_gesturetime); |
acquire_time = g_last_gesturetime; |
804 |
|
|
805 |
|
XSetSelectionOwner(g_display, primary_atom, g_wnd, acquire_time); |
806 |
if (XGetSelectionOwner(g_display, primary_atom) != g_wnd) |
if (XGetSelectionOwner(g_display, primary_atom) != g_wnd) |
807 |
{ |
{ |
808 |
warning("Failed to aquire ownership of PRIMARY clipboard\n"); |
warning("Failed to aquire ownership of PRIMARY clipboard\n"); |
814 |
rdesktop_clipboard_formats_atom, XA_STRING, 8, PropModeReplace, data, |
rdesktop_clipboard_formats_atom, XA_STRING, 8, PropModeReplace, data, |
815 |
length); |
length); |
816 |
|
|
817 |
XSetSelectionOwner(g_display, clipboard_atom, g_wnd, g_last_gesturetime); |
XSetSelectionOwner(g_display, clipboard_atom, g_wnd, acquire_time); |
818 |
if (XGetSelectionOwner(g_display, clipboard_atom) != g_wnd) |
if (XGetSelectionOwner(g_display, clipboard_atom) != g_wnd) |
819 |
warning("Failed to aquire ownership of CLIPBOARD clipboard\n"); |
warning("Failed to aquire ownership of CLIPBOARD clipboard\n"); |
820 |
} |
} |