diff options
-rw-r--r-- | common/rfb/CConnection.cxx | 6 | ||||
-rw-r--r-- | vncviewer/CConn.cxx | 23 | ||||
-rw-r--r-- | vncviewer/CConn.h | 5 |
3 files changed, 6 insertions, 28 deletions
diff --git a/common/rfb/CConnection.cxx b/common/rfb/CConnection.cxx index 5e7530c8..5f65624d 100644 --- a/common/rfb/CConnection.cxx +++ b/common/rfb/CConnection.cxx @@ -30,6 +30,7 @@ #include <rfb/Exception.h> #include <rfb/clipboardTypes.h> #include <rfb/fenceTypes.h> +#include <rfb/screenTypes.h> #include <rfb/CMsgReader.h> #include <rfb/CMsgWriter.h> #include <rfb/CSecurity.h> @@ -432,6 +433,11 @@ void CConnection::setExtendedDesktopSize(unsigned reason, CMsgHandler::setExtendedDesktopSize(reason, result, w, h, layout); + if ((reason == reasonClient) && (result != resultSuccess)) { + vlog.error("SetDesktopSize failed: %d", result); + return; + } + if (continuousUpdates) writer()->writeEnableContinuousUpdates(true, 0, 0, server.width(), diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index f8e80429..3a5c161f 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -35,7 +35,6 @@ #include <rfb/Hostname.h> #include <rfb/LogWriter.h> #include <rfb/Security.h> -#include <rfb/screenTypes.h> #include <rfb/fenceTypes.h> #include <rfb/Timer.h> #include <network/TcpSocket.h> @@ -317,28 +316,6 @@ void CConn::initDone() setPreferredEncoding(encNum); } -// setDesktopSize() is called when the desktop size changes (including when -// it is set initially). -void CConn::setDesktopSize(int w, int h) -{ - CConnection::setDesktopSize(w,h); - resizeFramebuffer(); -} - -// setExtendedDesktopSize() is a more advanced version of setDesktopSize() -void CConn::setExtendedDesktopSize(unsigned reason, unsigned result, - int w, int h, const rfb::ScreenSet& layout) -{ - CConnection::setExtendedDesktopSize(reason, result, w, h, layout); - - if ((reason == reasonClient) && (result != resultSuccess)) { - vlog.error(_("SetDesktopSize failed: %d"), result); - return; - } - - resizeFramebuffer(); -} - // setName() is called when the desktop name changes void CConn::setName(const char* name) { diff --git a/vncviewer/CConn.h b/vncviewer/CConn.h index a7b9afda..5c470508 100644 --- a/vncviewer/CConn.h +++ b/vncviewer/CConn.h @@ -57,11 +57,6 @@ public: void initDone() override; - void setDesktopSize(int w, int h) override; - void setExtendedDesktopSize(unsigned reason, unsigned result, - int w, int h, - const rfb::ScreenSet& layout) override; - void setName(const char* name) override; void setColourMapEntries(int firstColour, int nColours, |