Implemented support for DesktopName pseudo encoding, which allows
updating the desktop name on the fly.

Tested in ThinLinc since 2008-01-07. 



git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3549 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 7153dd4..9fe644c 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -232,6 +232,22 @@
   }
 }
 
+
+void VNCSConnectionST::setDesktopName(const char *name)
+{
+  cp.setName(name);
+  try {
+    if (state() == RFBSTATE_NORMAL) {
+      if (!writer()->writeSetDesktopName()) {
+	fprintf(stderr, "Client does not support desktop rename\n");
+      }
+    }
+  } catch(rdr::Exception& e) {
+    close(e.str());
+  }
+}
+
+
 void VNCSConnectionST::setCursorOrClose()
 {
   try {