/[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 1207 by ossman_, Mon Mar 27 09:20:24 2006 UTC revision 1209 by ossman_, Mon Mar 27 11:10:09 2006 UTC
# Line 821  ui_clip_handle_data(uint8 * data, uint32 Line 821  ui_clip_handle_data(uint8 * data, uint32
821  {  {
822          BOOL free_data = False;          BOOL free_data = False;
823    
824            if (length == 0)
825            {
826                    xclip_refuse_selection(&selection_request);
827                    has_selection_request = False;
828                    return;
829            }
830    
831          if (selection_request.target == format_string_atom || selection_request.target == XA_STRING)          if (selection_request.target == format_string_atom || selection_request.target == XA_STRING)
832          {          {
833                  /* We're expecting a CF_TEXT response */                  /* We're expecting a CF_TEXT response */
# Line 992  xclip_init(void) Line 999  xclip_init(void)
999          format_string_atom = XInternAtom(g_display, "STRING", False);          format_string_atom = XInternAtom(g_display, "STRING", False);
1000          format_utf8_string_atom = XInternAtom(g_display, "UTF8_STRING", False);          format_utf8_string_atom = XInternAtom(g_display, "UTF8_STRING", False);
1001          format_unicode_atom = XInternAtom(g_display, "text/unicode", False);          format_unicode_atom = XInternAtom(g_display, "text/unicode", False);
1002    
1003            /* rdesktop sets _RDESKTOP_CLIPBOARD_FORMATS on the root window when acquiring the clipboard.
1004               Other interested rdesktops can use this to notify their server of the available formats. */
1005            rdesktop_clipboard_formats_atom =
1006                    XInternAtom(g_display, "_RDESKTOP_CLIPBOARD_FORMATS", False);
1007            XSelectInput(g_display, DefaultRootWindow(g_display), PropertyChangeMask);
1008    
1009          num_targets = 0;          num_targets = 0;
1010          targets[num_targets++] = targets_atom;          targets[num_targets++] = targets_atom;
1011          targets[num_targets++] = timestamp_atom;          targets[num_targets++] = timestamp_atom;
1012          targets[num_targets++] = rdesktop_clipboard_formats_atom;          targets[num_targets++] = rdesktop_clipboard_formats_atom;
         targets[num_targets++] = format_string_atom;  
1013  #ifdef USE_UNICODE_CLIPBOARD  #ifdef USE_UNICODE_CLIPBOARD
1014          targets[num_targets++] = format_utf8_string_atom;          targets[num_targets++] = format_utf8_string_atom;
1015  #endif  #endif
1016          targets[num_targets++] = format_unicode_atom;          targets[num_targets++] = format_unicode_atom;
1017            targets[num_targets++] = format_string_atom;
1018          targets[num_targets++] = XA_STRING;          targets[num_targets++] = XA_STRING;
   
         /* rdesktop sets _RDESKTOP_CLIPBOARD_FORMATS on the root window when acquiring the clipboard.  
            Other interested rdesktops can use this to notify their server of the available formats. */  
         rdesktop_clipboard_formats_atom =  
                 XInternAtom(g_display, "_RDESKTOP_CLIPBOARD_FORMATS", False);  
         XSelectInput(g_display, DefaultRootWindow(g_display), PropertyChangeMask);  
1019  }  }

Legend:
Removed from v.1207  
changed lines
  Added in v.1209

  ViewVC Help
Powered by ViewVC 1.1.26