/[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 396 by forsberg, Fri Jun 6 09:32:56 2003 UTC revision 418 by forsberg, Fri Jun 6 12:34:56 2003 UTC
# Line 20  Line 20 
20    
21  #include <X11/Xlib.h>  #include <X11/Xlib.h>
22  #include <X11/Xatom.h>  #include <X11/Xatom.h>
23    #include <sys/time.h>
24    #include <sys/types.h>
25    #include <unistd.h>
26  #include "rdesktop.h"  #include "rdesktop.h"
27    
28  extern BOOL encryption;  extern BOOL encryption;
# Line 80  static void Line 83  static void
83  cliprdr_send_format_announce(void)  cliprdr_send_format_announce(void)
84  {  {
85          STREAM s;          STREAM s;
   
         DEBUG_CLIPBOARD(("Sending (empty) format announce\n"));  
86          int number_of_formats = 1;          int number_of_formats = 1;
87            DEBUG_CLIPBOARD(("Sending (empty) format announce\n"));
88          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);
89          out_uint32_le(s, number_of_formats * 36 + 12);          out_uint32_le(s, number_of_formats * 36 + 12);
90          out_uint32_le(s, 0x13);          out_uint32_le(s, 0x13);
# Line 634  cliprdr_handle_server_data_request(STREA Line 636  cliprdr_handle_server_data_request(STREA
636          }          }
637          else          else
638          {          {
                 DEBUG_CLIPBOARD(("There were no owner for PRIMARY, sending empty string\n"));   // FIXME: Should we always send an empty string?  
639    
640                  cliprdr_send_empty_datapacket();                  selectionowner = XGetSelectionOwner(display, clipboard_atom);
641                    if (None != selectionowner)
642                    {
643                            XConvertSelection(display, clipboard_atom,
644                                              targets_atom,
645                                              rdesktop_clipboard_target_atom, wnd, CurrentTime);
646    
647                            /* The rest of the transfer is handled in
648                               cliprdr_handle_SelectionNotify */
649    
650                    }
651                    else
652                    {
653    
654                            DEBUG_CLIPBOARD(("There were no owner for PRIMARY nor CLIPBOARD, sending empty string\n"));     // FIXME: Should we always send an empty string?
655    
656                            cliprdr_send_empty_datapacket();
657                    }
658          }          }
659    
660    

Legend:
Removed from v.396  
changed lines
  Added in v.418

  ViewVC Help
Powered by ViewVC 1.1.26