aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/ConnParams.h
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-06-20 12:25:14 +0200
committerPierre Ossman <ossman@cendio.se>2018-11-01 16:11:42 +0100
commit9312b0e3e16a0eee66945a1220d914067132de9a (patch)
tree78a8574b9d91bf6c1613d5a6f543e7454029638e /common/rfb/ConnParams.h
parent0fe375a209dd917de5cbabbfbe5915b9b58f8fa8 (diff)
downloadtigervnc-9312b0e3e16a0eee66945a1220d914067132de9a.tar.gz
tigervnc-9312b0e3e16a0eee66945a1220d914067132de9a.zip
Encapsulate screen layout storage in ConnParams
Avoid direct access to the screen dimensions and layout so that we can make sure it stays sane. This also makes sure the layout is properly updated when we only get the screen dimensions from the server.
Diffstat (limited to 'common/rfb/ConnParams.h')
-rw-r--r--common/rfb/ConnParams.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/common/rfb/ConnParams.h b/common/rfb/ConnParams.h
index b56c9407..1640efcc 100644
--- a/common/rfb/ConnParams.h
+++ b/common/rfb/ConnParams.h
@@ -62,9 +62,11 @@ namespace rfb {
return !beforeVersion(major,minor+1);
}
- int width;
- int height;
- ScreenSet screenLayout;
+ const int width() const { return width_; }
+ const int height() const { return height_; }
+ const ScreenSet& screenLayout() const { return screenLayout_; }
+ void setDimensions(int width, int height);
+ void setDimensions(int width, int height, const ScreenSet& layout);
const PixelFormat& pf() const { return pf_; }
void setPF(const PixelFormat& pf);
@@ -105,6 +107,10 @@ namespace rfb {
private:
+ int width_;
+ int height_;
+ ScreenSet screenLayout_;
+
PixelFormat pf_;
char* name_;
Cursor* cursor_;