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/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx
index 3ce7473..17152ab 100644
--- a/common/rfb/CMsgReader.cxx
+++ b/common/rfb/CMsgReader.cxx
@@ -43,13 +43,10 @@
{
int width = is->readU16();
int height = is->readU16();
- handler->setDesktopSize(width, height);
PixelFormat pf;
pf.read(is);
- handler->setPixelFormat(pf);
CharArray name(is->readString());
- handler->setName(name.buf);
- handler->serverInit();
+ handler->serverInit(width, height, pf, name.buf);
}
void CMsgReader::readMsg()