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/CMsgReader.cxx b/common/rfb/CMsgReader.cxx
index cc28846..0e3d967 100644
--- a/common/rfb/CMsgReader.cxx
+++ b/common/rfb/CMsgReader.cxx
@@ -138,6 +138,19 @@
handler->setCursor(width, height, hotspot, data.buf, mask.buf);
}
+void CMsgReader::readSetDesktopName(int x, int y, int w, int h)
+{
+ char* name = is->readString();
+
+ if (x || y || w || h) {
+ fprintf(stderr, "Ignoring DesktopName rect with non-zero position/size\n");
+ } else {
+ handler->setName(name);
+ }
+
+ delete [] name;
+}
+
rdr::U8* CMsgReader::getImageBuf(int required, int requested, int* nPixels)
{
int requiredBytes = required * (handler->cp.pf().bpp / 8);