summaryrefslogtreecommitdiffstats
path: root/common/rfb/CMsgHandler.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-10-31 17:08:59 +0100
committerPierre Ossman <ossman@cendio.se>2018-11-01 16:11:42 +0100
commitdd45b4490100f70e21000c5181540c224e0f3c41 (patch)
tree440df3c66f396e20c1dc40989d1ee40211252d26 /common/rfb/CMsgHandler.h
parent2affd7753274ddf3b93505f0ae26af3c45aa3fec (diff)
downloadtigervnc-dd45b4490100f70e21000c5181540c224e0f3c41.tar.gz
tigervnc-dd45b4490100f70e21000c5181540c224e0f3c41.zip
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.
Diffstat (limited to 'common/rfb/CMsgHandler.h')
-rw-r--r--common/rfb/CMsgHandler.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/rfb/CMsgHandler.h b/common/rfb/CMsgHandler.h
index 55241dac..effdaabf 100644
--- a/common/rfb/CMsgHandler.h
+++ b/common/rfb/CMsgHandler.h
@@ -41,9 +41,9 @@ namespace rfb {
// The following methods are called as corresponding messages are read. A
// derived class should override these methods as desired. Note that for
- // the setDesktopSize(), setExtendedDesktopSize(), setPixelFormat() and
- // setName() methods, a derived class should call on to CMsgHandler's
- // methods to set the members of "server" appropriately.
+ // the setDesktopSize(), setExtendedDesktopSize(), setPixelFormat(),
+ // setName() and serverInit() methods, a derived class should call on to
+ // CMsgHandler's methods to set the members of "server" appropriately.
virtual void setDesktopSize(int w, int h);
virtual void setExtendedDesktopSize(unsigned reason, unsigned result,
@@ -56,7 +56,9 @@ namespace rfb {
virtual void fence(rdr::U32 flags, unsigned len, const char data[]);
virtual void endOfContinuousUpdates();
virtual void supportsQEMUKeyEvent();
- virtual void serverInit() = 0;
+ virtual void serverInit(int width, int height,
+ const PixelFormat& pf,
+ const char* name) = 0;
virtual void readAndDecodeRect(const Rect& r, int encoding,
ModifiablePixelBuffer* pb) = 0;