/[rdesktop]/sourceforge.net/trunk/rdesktop/cliprdr.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/cliprdr.c

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

revision 394 by forsberg, Fri Jun 6 09:31:28 2003 UTC revision 395 by forsberg, Fri Jun 6 09:32:15 2003 UTC
# Line 78  cliprdr_set_selection_timestamp(void) Line 78  cliprdr_set_selection_timestamp(void)
78  static void  static void
79  cliprdr_send_format_announce(void)  cliprdr_send_format_announce(void)
80  {  {
         DEBUG_CLIPBOARD(("Sending (empty) format announce\n"));  
   
81          STREAM s;          STREAM s;
82    
83            DEBUG_CLIPBOARD(("Sending (empty) format announce\n"));
84          int number_of_formats = 1;          int number_of_formats = 1;
85          s = sec_init(encryption ? SEC_ENCRYPT : 0, number_of_formats*36+12+4+4);          s = sec_init(encryption ? SEC_ENCRYPT : 0, number_of_formats*36+12+4+4);
86          out_uint32_le(s, number_of_formats*36+12);          out_uint32_le(s, number_of_formats*36+12);
# Line 247  cliprdr_handle_SelectionNotify(XSelectio Line 247  cliprdr_handle_SelectionNotify(XSelectio
247                          return;                          return;
248                  }                  }
249    
                 DEBUG_CLIPBOARD(("Received %d bytes of clipboard data from X, there is %d remaining\n",  
                                  nitems, bytes_left));  
                 DEBUG_CLIPBOARD(("type_return is %s\n",  
                                  XGetAtomName(display, type_return)));  
   
250                  datap = data;                  datap = data;
251    
252                  if (nitems+1 <= MAX_CLIPRDR_STANDALONE_DATASIZE)                  if (nitems+1 <= MAX_CLIPRDR_STANDALONE_DATASIZE)
# Line 311  cliprdr_handle_SelectionNotify(XSelectio Line 306  cliprdr_handle_SelectionNotify(XSelectio
306                                  datap+=MAX_CLIPRDR_CONTINUATION_DATASIZE;                                  datap+=MAX_CLIPRDR_CONTINUATION_DATASIZE;
307                                                                    
308                          }                          }
309                          DEBUG_CLIPBOARD(("Sending %d bytes of data\n",                          DEBUG_CLIPBOARD(("Sending %u bytes of data\n",
310                                           12+bytes_left_to_transfer));                                           12+bytes_left_to_transfer));
311                          out =  sec_init(encryption ? SEC_ENCRYPT : 0,                          out =  sec_init(encryption ? SEC_ENCRYPT : 0,
312                                          12+bytes_left_to_transfer);                                          12+bytes_left_to_transfer);
# Line 373  cliprdr_handle_SelectionRequest(XSelecti Line 368  cliprdr_handle_SelectionRequest(XSelecti
368  {  {
369    
370          XSelectionEvent xev;          XSelectionEvent xev;
         unsigned char   *data;  
371          unsigned long   nitems, bytes_left;          unsigned long   nitems, bytes_left;
372          Atom type_return;                Atom type_return;      
373          uint32 *wanted_formatcode;          uint32 *wanted_formatcode;
# Line 417  cliprdr_handle_SelectionRequest(XSelecti Line 411  cliprdr_handle_SelectionRequest(XSelecti
411                                     &format,                                     &format,
412                                     &nitems,                                     &nitems,
413                                     &bytes_left,                                     &bytes_left,
414                                     &wanted_formatcode);                                     (unsigned char **)&wanted_formatcode);
415                  DEBUG_CLIPBOARD(("Got wanted formatcode %d, format is %d\n", *wanted_formatcode, format));                  DEBUG_CLIPBOARD(("Got wanted formatcode %d, format is %d\n", *wanted_formatcode, format));
416                  cliprdr_request_clipboard_data(*wanted_formatcode);                  cliprdr_request_clipboard_data(*wanted_formatcode);
417          }          }
# Line 442  cliprdr_handle_SelectionRequest(XSelecti Line 436  cliprdr_handle_SelectionRequest(XSelecti
436                  return;                  return;
437          } else if (timestamp_atom == xevent->target)          } else if (timestamp_atom == xevent->target)
438          {          {
439                    DEBUG_CLIPBOARD(("Sending TIMESTAMP\n"));
440                  XChangeProperty(display,                  XChangeProperty(display,
441                                  xevent->requestor,                                  xevent->requestor,
442                                  xevent->property,                                  xevent->property,
# Line 605  void cliprdr_handle_server_data(uint32 l Line 600  void cliprdr_handle_server_data(uint32 l
600                                   bytes_left_to_read));                                   bytes_left_to_read));
601                  memcpy(datap, s->p, bytes_left_to_read);                  memcpy(datap, s->p, bytes_left_to_read);
602          }          }
603            DEBUG_CLIPBOARD(("Setting target atom (%s) on %d\n",
604                             XGetAtomName(display, selection_event.property),
605                             selection_event.requestor));
606          XChangeProperty(display,          XChangeProperty(display,
607                          selection_event.requestor,                          selection_event.requestor,
608                          selection_event.property,                          selection_event.property,
# Line 644  void cliprdr_handle_server_data_request( Line 642  void cliprdr_handle_server_data_request(
642    
643          if (rdesktop_is_selection_owner)          if (rdesktop_is_selection_owner)
644          {          {
645                    DEBUG_CLIPBOARD(("XChangeProperty, rdesktop_is_selection_owner\n"));
646                  XChangeProperty(display, wnd, rdesktop_clipboard_target_atom,                  XChangeProperty(display, wnd, rdesktop_clipboard_target_atom,
647                                  XA_INTEGER, 32, PropModeReplace,                                  XA_INTEGER, 32, PropModeReplace,
648                                  (unsigned char *)&wanted_formatcode, 1);                                  (unsigned char *)&wanted_formatcode, 1);

Legend:
Removed from v.394  
changed lines
  Added in v.395

  ViewVC Help
Powered by ViewVC 1.1.26