56 |
XSendEvent(g_display, req->requestor, False, NoEventMask, &xev); |
XSendEvent(g_display, req->requestor, False, NoEventMask, &xev); |
57 |
} |
} |
58 |
|
|
59 |
void |
static void |
60 |
xclip_handle_SelectionNotify(XSelectionEvent * event) |
xclip_handle_SelectionNotify(XSelectionEvent * event) |
61 |
{ |
{ |
62 |
unsigned long nitems, bytes_left; |
unsigned long nitems, bytes_left; |
129 |
cliprdr_send_data(NULL, 0); |
cliprdr_send_data(NULL, 0); |
130 |
} |
} |
131 |
|
|
132 |
void |
static void |
133 |
xclip_handle_SelectionRequest(XSelectionRequestEvent * event) |
xclip_handle_SelectionRequest(XSelectionRequestEvent * event) |
134 |
{ |
{ |
135 |
unsigned long nitems, bytes_left; |
unsigned long nitems, bytes_left; |
170 |
/* wait for data */ |
/* wait for data */ |
171 |
} |
} |
172 |
|
|
173 |
void |
static void |
174 |
xclip_handle_SelectionClear(void) |
xclip_handle_SelectionClear(void) |
175 |
{ |
{ |
176 |
DEBUG_CLIPBOARD(("xclip_handle_SelectionClear\n")); |
DEBUG_CLIPBOARD(("xclip_handle_SelectionClear\n")); |
179 |
cliprdr_send_text_format_announce(); |
cliprdr_send_text_format_announce(); |
180 |
} |
} |
181 |
|
|
182 |
void |
static void |
183 |
xclip_handle_PropertyNotify(XPropertyEvent * event) |
xclip_handle_PropertyNotify(XPropertyEvent * event) |
184 |
{ |
{ |
185 |
unsigned long nitems, bytes_left; |
unsigned long nitems, bytes_left; |
197 |
{ |
{ |
198 |
res = XGetWindowProperty(g_display, DefaultRootWindow(g_display), |
res = XGetWindowProperty(g_display, DefaultRootWindow(g_display), |
199 |
rdesktop_clipboard_formats_atom, 0, |
rdesktop_clipboard_formats_atom, 0, |
200 |
XMaxRequestSize(g_display), False, XA_STRING, &type, &format, |
XMaxRequestSize(g_display), False, XA_STRING, &type, |
201 |
&nitems, &bytes_left, &data); |
&format, &nitems, &bytes_left, &data); |
202 |
|
|
203 |
if ((res == Success) && (nitems > 0)) |
if ((res == Success) && (nitems > 0)) |
204 |
{ |
{ |
296 |
clipboard_atom = XInternAtom(g_display, "CLIPBOARD", False); |
clipboard_atom = XInternAtom(g_display, "CLIPBOARD", False); |
297 |
targets_atom = XInternAtom(g_display, "TARGETS", False); |
targets_atom = XInternAtom(g_display, "TARGETS", False); |
298 |
timestamp_atom = XInternAtom(g_display, "TIMESTAMP", False); |
timestamp_atom = XInternAtom(g_display, "TIMESTAMP", False); |
299 |
rdesktop_clipboard_target_atom = XInternAtom(g_display, "_RDESKTOP_CLIPBOARD_TARGET", False); |
rdesktop_clipboard_target_atom = |
300 |
|
XInternAtom(g_display, "_RDESKTOP_CLIPBOARD_TARGET", False); |
301 |
incr_atom = XInternAtom(g_display, "INCR", False); |
incr_atom = XInternAtom(g_display, "INCR", False); |
302 |
targets[0] = targets_atom; |
targets[0] = targets_atom; |
303 |
targets[1] = XInternAtom(g_display, "TEXT", False); |
targets[1] = XInternAtom(g_display, "TEXT", False); |