Revision: 4430
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4430&view=rev
Author:   ossman_
Date:     2011-05-19 14:47:15 +0000 (Thu, 19 May 2011)

Log Message:
-----------
Implement support for clipboard data coming from the server.

Modified Paths:
--------------
    trunk/vncviewer/CConn.cxx

Modified: trunk/vncviewer/CConn.cxx
===================================================================
--- trunk/vncviewer/CConn.cxx   2011-05-19 09:35:36 UTC (rev 4429)
+++ trunk/vncviewer/CConn.cxx   2011-05-19 14:47:15 UTC (rev 4430)
@@ -336,7 +336,18 @@
 
 void CConn::serverCutText(const char* str, rdr::U32 len)
 {
-//  desktop->serverCutText(str,len);
+  char buffer[1024];
+  int ret;
+
+  ret = fl_utf8froma(buffer, sizeof(buffer), str, len);
+  if (ret >= sizeof(buffer)) {
+    vlog.error(_("Clipboard buffer overflow!"));
+    return;
+  }
+
+  vlog.debug("Got clipboard data: '%s'", buffer);
+
+  Fl::copy(buffer, ret, 1);
 }
 
 // We start timing on beginRect and stop timing on endRect, to


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to