/[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 1209 by ossman_, Mon Mar 27 11:10:09 2006 UTC revision 1210 by ossman_, Mon Mar 27 11:31:10 2006 UTC
# Line 114  static int have_primary = 0; Line 114  static int have_primary = 0;
114  /* Denotes that an rdesktop (not this rdesktop) is owning the selection,  /* Denotes that an rdesktop (not this rdesktop) is owning the selection,
115     allowing us to interchange Windows native clipboard data directly. */     allowing us to interchange Windows native clipboard data directly. */
116  static int rdesktop_is_selection_owner = 0;  static int rdesktop_is_selection_owner = 0;
117    /* Time when we acquired the selection. */
118    static Time acquire_time = 0;
119    
120  /* Denotes that an INCR ("chunked") transfer is in progress. */  /* Denotes that an INCR ("chunked") transfer is in progress. */
121  static int g_waiting_for_INCR = 0;  static int g_waiting_for_INCR = 0;
# Line 614  xclip_handle_SelectionRequest(XSelection Line 616  xclip_handle_SelectionRequest(XSelection
616          }          }
617          else if (event->target == timestamp_atom)          else if (event->target == timestamp_atom)
618          {          {
619                  xclip_provide_selection(event, XA_INTEGER, 32, (uint8 *) & g_last_gesturetime, 1);                  xclip_provide_selection(event, XA_INTEGER, 32, (uint8 *) & acquire_time, 1);
620                  return;                  return;
621          }          }
622          else          else
# Line 798  xclip_handle_PropertyNotify(XPropertyEve Line 800  xclip_handle_PropertyNotify(XPropertyEve
800  void  void
801  ui_clip_format_announce(uint8 * data, uint32 length)  ui_clip_format_announce(uint8 * data, uint32 length)
802  {  {
803          XSetSelectionOwner(g_display, primary_atom, g_wnd, g_last_gesturetime);          acquire_time = g_last_gesturetime;
804    
805            XSetSelectionOwner(g_display, primary_atom, g_wnd, acquire_time);
806          if (XGetSelectionOwner(g_display, primary_atom) != g_wnd)          if (XGetSelectionOwner(g_display, primary_atom) != g_wnd)
807          {          {
808                  warning("Failed to aquire ownership of PRIMARY clipboard\n");                  warning("Failed to aquire ownership of PRIMARY clipboard\n");
# Line 810  ui_clip_format_announce(uint8 * data, ui Line 814  ui_clip_format_announce(uint8 * data, ui
814                          rdesktop_clipboard_formats_atom, XA_STRING, 8, PropModeReplace, data,                          rdesktop_clipboard_formats_atom, XA_STRING, 8, PropModeReplace, data,
815                          length);                          length);
816    
817          XSetSelectionOwner(g_display, clipboard_atom, g_wnd, g_last_gesturetime);          XSetSelectionOwner(g_display, clipboard_atom, g_wnd, acquire_time);
818          if (XGetSelectionOwner(g_display, clipboard_atom) != g_wnd)          if (XGetSelectionOwner(g_display, clipboard_atom) != g_wnd)
819                  warning("Failed to aquire ownership of CLIPBOARD clipboard\n");                  warning("Failed to aquire ownership of CLIPBOARD clipboard\n");
820  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.26