CVS: rdesktop xclip.c,1.33,1.34

Pierre Ossman <[email protected]> Mon, 27 Mar 2006 03:31:12 -0800
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3773

Modified Files:
	xclip.c 
Log Message:
Store the time when we acquired the selection so that we can correctly
report it when queried.


Index: xclip.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xclip.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** xclip.c	27 Mar 2006 11:10:09 -0000	1.33
--- xclip.c	27 Mar 2006 11:31:10 -0000	1.34
***************
*** 115,118 ****
--- 115,120 ----
     allowing us to interchange Windows native clipboard data directly. */
  static int rdesktop_is_selection_owner = 0;
+ /* Time when we acquired the selection. */
+ static Time acquire_time = 0;
  
  /* Denotes that an INCR ("chunked") transfer is in progress. */
***************
*** 615,619 ****
  	else if (event->target == timestamp_atom)
  	{
! 		xclip_provide_selection(event, XA_INTEGER, 32, (uint8 *) & g_last_gesturetime, 1);
  		return;
  	}
--- 617,621 ----
  	else if (event->target == timestamp_atom)
  	{
! 		xclip_provide_selection(event, XA_INTEGER, 32, (uint8 *) & acquire_time, 1);
  		return;
  	}
***************
*** 799,803 ****
  ui_clip_format_announce(uint8 * data, uint32 length)
  {
! 	XSetSelectionOwner(g_display, primary_atom, g_wnd, g_last_gesturetime);
  	if (XGetSelectionOwner(g_display, primary_atom) != g_wnd)
  	{
--- 801,807 ----
  ui_clip_format_announce(uint8 * data, uint32 length)
  {
! 	acquire_time = g_last_gesturetime;
! 
! 	XSetSelectionOwner(g_display, primary_atom, g_wnd, acquire_time);
  	if (XGetSelectionOwner(g_display, primary_atom) != g_wnd)
  	{
***************
*** 811,815 ****
  			length);
  
! 	XSetSelectionOwner(g_display, clipboard_atom, g_wnd, g_last_gesturetime);
  	if (XGetSelectionOwner(g_display, clipboard_atom) != g_wnd)
  		warning("Failed to aquire ownership of CLIPBOARD clipboard\n");
--- 815,819 ----
  			length);
  
! 	XSetSelectionOwner(g_display, clipboard_atom, g_wnd, acquire_time);
  	if (XGetSelectionOwner(g_display, clipboard_atom) != g_wnd)
  		warning("Failed to aquire ownership of CLIPBOARD clipboard\n");



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642