From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Thu, 28 May 2020 10:04:03 +0000 (+0100) Subject: Send response for refused SetDesktopSize X-Git-Tag: v1.10.90~26^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F1036%2Fhead;p=tigervnc.git Send response for refused SetDesktopSize Sends response for SetDesktopSize as per the community wiki specification --- diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 5d2d4b13..9b5ead9f 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -653,10 +653,11 @@ void VNCSConnectionST::setDesktopSize(int fb_width, int fb_height, { unsigned int result; - if (!accessCheck(AccessSetDesktopSize)) return; - if (!rfb::Server::acceptSetDesktopSize) return; + if (!accessCheck(AccessSetDesktopSize) || !rfb::Server::acceptSetDesktopSize) + result = resultProhibited; + else + result = server->setDesktopSize(this, fb_width, fb_height, layout); - result = server->setDesktopSize(this, fb_width, fb_height, layout); writer()->writeDesktopSize(reasonClient, result); }