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/unix/vncviewer/CConn.cxx b/unix/vncviewer/CConn.cxx
index cb33066..711bd52 100644
--- a/unix/vncviewer/CConn.cxx
+++ b/unix/vncviewer/CConn.cxx
@@ -74,6 +74,7 @@
     currentEncoding = encNum;
   }
   cp.supportsDesktopResize = true;
+  cp.supportsDesktopRename = true;
   cp.supportsLocalCursor = useLocalCursor;
   cp.customCompressLevel = customCompressLevel;
   cp.compressLevel = compressLevel;
@@ -271,6 +272,14 @@
   }
 }
 
+// setName() is called when the desktop name changes
+void CConn::setName(const char* name) {
+  CConnection::setName(name);
+  if (viewport) {
+    viewport->setName(name);
+  }
+}
+
 // framebufferUpdateEnd() is called at the end of an update.
 // For each rectangle, the FdInStream will have timed the speed
 // of the connection, allowing us to select format and encoding
diff --git a/unix/vncviewer/CConn.h b/unix/vncviewer/CConn.h
index a81af48..d969a68 100644
--- a/unix/vncviewer/CConn.h
+++ b/unix/vncviewer/CConn.h
@@ -74,6 +74,7 @@
   rfb::CSecurity* getCSecurity(int secType);
   void serverInit();
   void setDesktopSize(int w, int h);
+  void setName(const char* name);
   void setColourMapEntries(int firstColour, int nColours, rdr::U16* rgbs);
   void bell();
   void serverCutText(const char* str, int len);