/[rdesktop]/sourceforge.net/trunk/rdesktop/xclip.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/xclip.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 450 by jsorg71, Wed Aug 27 22:51:33 2003 UTC revision 468 by astrand, Mon Sep 15 07:59:36 2003 UTC
# Line 133  void Line 133  void
133  xclip_handle_SelectionRequest(XSelectionRequestEvent * event)  xclip_handle_SelectionRequest(XSelectionRequestEvent * event)
134  {  {
135          unsigned long nitems, bytes_left;          unsigned long nitems, bytes_left;
136            unsigned char *prop_return;
137          uint32 *wanted_format;          uint32 *wanted_format;
138          int format, res;          int format, res;
139          Atom type;          Atom type;
# Line 156  xclip_handle_SelectionRequest(XSelection Line 157  xclip_handle_SelectionRequest(XSelection
157          {          {
158                  res = XGetWindowProperty(g_display, event->requestor,                  res = XGetWindowProperty(g_display, event->requestor,
159                                           rdesktop_clipboard_target_atom, 0, 1, True, XA_INTEGER,                                           rdesktop_clipboard_target_atom, 0, 1, True, XA_INTEGER,
160                                           &type, &format, &nitems, &bytes_left,                                           &type, &format, &nitems, &bytes_left, &prop_return);
161                                           (unsigned char **) &wanted_format);                  wanted_format = (uint32 *) prop_return;
162                  format = (res == Success) ? *wanted_format : CF_TEXT;                  format = (res == Success) ? *wanted_format : CF_TEXT;
163                    /* FIXME: Need to free returned data? */
164          }          }
165          else          else
166          {          {
# Line 197  xclip_handle_PropertyNotify(XPropertyEve Line 199  xclip_handle_PropertyNotify(XPropertyEve
199          {          {
200                  res = XGetWindowProperty(g_display, DefaultRootWindow(g_display),                  res = XGetWindowProperty(g_display, DefaultRootWindow(g_display),
201                                           rdesktop_clipboard_formats_atom, 0,                                           rdesktop_clipboard_formats_atom, 0,
202                                           XMaxRequestSize(g_display), False, XA_STRING, &type, &format,                                           XMaxRequestSize(g_display), False, XA_STRING, &type,
203                                           &nitems, &bytes_left, &data);                                           &format, &nitems, &bytes_left, &data);
204    
205                  if ((res == Success) && (nitems > 0))                  if ((res == Success) && (nitems > 0))
206                  {                  {
# Line 296  xclip_init(void) Line 298  xclip_init(void)
298          clipboard_atom = XInternAtom(g_display, "CLIPBOARD", False);          clipboard_atom = XInternAtom(g_display, "CLIPBOARD", False);
299          targets_atom = XInternAtom(g_display, "TARGETS", False);          targets_atom = XInternAtom(g_display, "TARGETS", False);
300          timestamp_atom = XInternAtom(g_display, "TIMESTAMP", False);          timestamp_atom = XInternAtom(g_display, "TIMESTAMP", False);
301          rdesktop_clipboard_target_atom = XInternAtom(g_display, "_RDESKTOP_CLIPBOARD_TARGET", False);          rdesktop_clipboard_target_atom =
302                    XInternAtom(g_display, "_RDESKTOP_CLIPBOARD_TARGET", False);
303          incr_atom = XInternAtom(g_display, "INCR", False);          incr_atom = XInternAtom(g_display, "INCR", False);
304          targets[0] = targets_atom;          targets[0] = targets_atom;
305          targets[1] = XInternAtom(g_display, "TEXT", False);          targets[1] = XInternAtom(g_display, "TEXT", False);

Legend:
Removed from v.450  
changed lines
  Added in v.468

  ViewVC Help
Powered by ViewVC 1.1.26