Explicitly check screen layout after change

There are some cases where the server state will not automatically
be updated on a change. A prominent one is when only RFB attributes
were changes (e.g. the screen ID) but nothing else. In that case
there is no actual change in the X server, so it never sends any
notification about change back to us.
diff --git a/unix/x0vncserver/XDesktop.cxx b/unix/x0vncserver/XDesktop.cxx
index d8360ab..c7961f2 100644
--- a/unix/x0vncserver/XDesktop.cxx
+++ b/unix/x0vncserver/XDesktop.cxx
@@ -567,11 +567,14 @@
      VNCSConnectionST::setDesktopSize. Another ExtendedDesktopSize
      with reason=0 will be sent in response to the changes seen by the
      event handler. */
-  if (adjustedLayout != layout) {
+  if (adjustedLayout != layout)
     return rfb::resultInvalid;
-  } else {
-    return ret;
-  }
+
+  // Explicitly update the server state with the result as there
+  // can be corner cases where we don't get feedback from the X server
+  server->setScreenLayout(computeScreenLayout());
+
+  return ret;
 
 #else
   return rfb::resultProhibited;