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/tests/decperf.cxx b/tests/decperf.cxx
index 056848a..301e45e 100644
--- a/tests/decperf.cxx
+++ b/tests/decperf.cxx
@@ -47,7 +47,7 @@
CConn(const char *filename);
~CConn();
- virtual void setDesktopSize(int w, int h);
+ virtual void initDone();
virtual void setPixelFormat(const rfb::PixelFormat& pf);
virtual void setCursor(int, int, const rfb::Point&, const rdr::U8*);
virtual void framebufferUpdateStart();
@@ -81,10 +81,8 @@
delete in;
}
-void CConn::setDesktopSize(int w, int h)
+void CConn::initDone()
{
- CConnection::setDesktopSize(w, h);
-
setFramebuffer(new rfb::ManagedPixelBuffer(filePF,
server.width(),
server.height()));