Let CMsgHandler::serverInit() handle initial set up
Avoid using the callbacks used for runtime changes for the initial
setup. They weren't really useful anyway as you could not allocate
a framebuffer without also knowing the pixel format. So make things
more clear by letting serverInit() get the initial settings.
diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx
index 23257ee..3e156ad 100644
--- a/vncviewer/CConn.cxx
+++ b/vncviewer/CConn.cxx
@@ -363,8 +363,7 @@
void CConn::setName(const char* name)
{
CConnection::setName(name);
- if (desktop)
- desktop->setName(name);
+ desktop->setName(name);
}
// framebufferUpdateStart() is called at the beginning of an update.
@@ -495,9 +494,6 @@
void CConn::resizeFramebuffer()
{
- if (!desktop)
- return;
-
if (continuousUpdates)
writer()->writeEnableContinuousUpdates(true, 0, 0,
server.width(),