diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-06-20 12:25:14 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-11-01 16:11:42 +0100 |
commit | 9312b0e3e16a0eee66945a1220d914067132de9a (patch) | |
tree | 78a8574b9d91bf6c1613d5a6f543e7454029638e /common/rfb/CMsgReader.cxx | |
parent | 0fe375a209dd917de5cbabbfbe5915b9b58f8fa8 (diff) | |
download | tigervnc-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/CMsgReader.cxx')
-rw-r--r-- | common/rfb/CMsgReader.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx index 1d359d2c..7502df6a 100644 --- a/common/rfb/CMsgReader.cxx +++ b/common/rfb/CMsgReader.cxx @@ -192,10 +192,10 @@ void CMsgReader::readFramebufferUpdate() void CMsgReader::readRect(const Rect& r, int encoding) { - if ((r.br.x > handler->cp.width) || (r.br.y > handler->cp.height)) { + if ((r.br.x > handler->cp.width()) || (r.br.y > handler->cp.height())) { fprintf(stderr, "Rect too big: %dx%d at %d,%d exceeds %dx%d\n", r.width(), r.height(), r.tl.x, r.tl.y, - handler->cp.width, handler->cp.height); + handler->cp.width(), handler->cp.height()); throw Exception("Rect too big"); } |