We should only send ExtendedDesktopSize to a client supporting both it and
the old DesktopSize.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3817 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 12cfab8..e286cf3 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -171,10 +171,12 @@
cp.height = server->pb->height();
cp.screenLayout = server->screenLayout;
if (state() == RFBSTATE_NORMAL) {
- if (!writer()->writeSetDesktopSize() &&
- !writer()->writeExtendedDesktopSize()) {
- close("Client does not support desktop resize");
- return;
+ // We should only send EDS to client asking for both
+ if (!writer()->writeExtendedDesktopSize()) {
+ if (!writer()->writeSetDesktopSize()) {
+ close("Client does not support desktop resize");
+ return;
+ }
}
}
}