CMsgHandler::setExtendedDesktopSize(reason, result, w, h, layout);
}
+void CConnection::serverInit()
+{
+ state_ = RFBSTATE_NORMAL;
+ vlog.debug("initialisation done");
+
+ initDone();
+}
+
void CConnection::readAndDecodeRect(const Rect& r, int encoding,
ModifiablePixelBuffer* pb)
{
{
}
-void CConnection::serverInit()
+void CConnection::initDone()
{
- state_ = RFBSTATE_NORMAL;
- vlog.debug("initialisation done");
}
void CConnection::fence(rdr::U32 flags, unsigned len, const char data[])
int w, int h,
const ScreenSet& layout);
+ virtual void serverInit();
+
virtual void readAndDecodeRect(const Rect& r, int encoding,
ModifiablePixelBuffer* pb);
// authSuccess() is called when authentication has succeeded.
virtual void authSuccess();
- // serverInit() is called when the ServerInit message is received. The
- // derived class must call on to CConnection::serverInit().
- virtual void serverInit();
+ // initDone() is called when the connection is fully established
+ // and standard messages can be sent. This is called before the
+ // initial FramebufferUpdateRequest giving a derived class the
+ // chance to modify pixel format and settings.
+ virtual void initDone();
// Other methods
////////////////////// CConnection callback methods //////////////////////
-// serverInit() is called when the serverInit message has been received. At
+// initDone() is called when the serverInit message has been received. At
// this point we create the desktop window and display it. We also tell the
// server the pixel format and encodings to use and request the first update.
-void CConn::serverInit()
+void CConn::initDone()
{
- CConnection::serverInit();
-
// If using AutoSelect with old servers, start in FullColor
// mode. See comment in autoSelectFormatAndEncoding.
if (server.beforeVersion(3, 8) && autoSelect)
static void socketEvent(FL_SOCKET fd, void *data);
// CConnection callback methods
- void serverInit();
+ void initDone();
void setDesktopSize(int w, int h);
void setExtendedDesktopSize(unsigned reason, unsigned result,