]> source.dussan.org Git - tigervnc.git/commitdiff
Send response for refused SetDesktopSize 1036/head
authormatt335672 <30179339+matt335672@users.noreply.github.com>
Thu, 28 May 2020 10:04:03 +0000 (11:04 +0100)
committermatt335672 <30179339+matt335672@users.noreply.github.com>
Fri, 29 May 2020 14:36:50 +0000 (15:36 +0100)
Sends response for SetDesktopSize as per the community wiki
specification

common/rfb/VNCSConnectionST.cxx

index 5d2d4b1366b46a3fac6a2ee41c72b5287f3bc4df..9b5ead9fd32aeadaa8a22b5957ed7fa7c77eab67 100644 (file)
@@ -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);
 }