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/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index fc2e931..d36354c 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -302,6 +302,16 @@
}
}
+void VNCServerST::setName(const char* name_)
+{
+ name.replaceBuf(strDup(name_));
+ std::list<VNCSConnectionST*>::iterator ci, ci_next;
+ for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
+ ci_next = ci; ci_next++;
+ (*ci)->setDesktopName(name_);
+ }
+}
+
void VNCServerST::add_changed(const Region& region)
{
if (comparer != 0) {