From 051a83a8b1465cf8818a805d197391fbc091f73b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20=C3=85strand?= Date: Thu, 15 Jan 2009 13:36:03 +0000 Subject: [PATCH] Make sure to prefix even new desktop names with "VNC:". git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3552 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/vncviewer/CConn.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unix/vncviewer/CConn.cxx b/unix/vncviewer/CConn.cxx index cab776a9..7308eb18 100644 --- a/unix/vncviewer/CConn.cxx +++ b/unix/vncviewer/CConn.cxx @@ -275,8 +275,15 @@ void CConn::setDesktopSize(int w, int h) { // setName() is called when the desktop name changes void CConn::setName(const char* name) { CConnection::setName(name); + + CharArray windowNameStr(windowName.getData()); + if (!windowNameStr.buf[0]) { + windowNameStr.replaceBuf(new char[256]); + snprintf(windowNameStr.buf, 256, _("VNC: %.240s"), cp.name()); + } + if (viewport) { - viewport->setName(name); + viewport->setName(windowNameStr.buf); } } -- 2.39.5