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/CMsgHandler.cxx b/common/rfb/CMsgHandler.cxx
index 4289cbf..4fe5041 100644
--- a/common/rfb/CMsgHandler.cxx
+++ b/common/rfb/CMsgHandler.cxx
@@ -74,6 +74,15 @@
server.supportsQEMUKeyEvent = true;
}
+void CMsgHandler::serverInit(int width, int height,
+ const PixelFormat& pf,
+ const char* name)
+{
+ server.setDimensions(width, height);
+ server.setPF(pf);
+ server.setName(name);
+}
+
void CMsgHandler::framebufferUpdateStart()
{
}