Send desktop layout changes separately

Make sure we send any modifications to the desktop layout in a message that
does not modify the framebuffer data. This is required to make sure we have
a valid state on the client as it drops the framebuffer when it recieves a
framebuffer dimension change.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3787 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/SMsgWriter.h b/common/rfb/SMsgWriter.h
index 5df7270..44a3915 100644
--- a/common/rfb/SMsgWriter.h
+++ b/common/rfb/SMsgWriter.h
@@ -98,8 +98,7 @@
                                 int hotspotY, void* data, void* mask)=0;
 
     // needFakeUpdate() returns true when an immediate update is needed in
-    // order to flush out setDesktopSize or setCursor pseudo-rectangles to the
-    // client.
+    // order to flush out pseudo-rectangles to the client.
     virtual bool needFakeUpdate();
 
     // writeFramebufferUpdate() writes a framebuffer update using the given
@@ -114,6 +113,16 @@
                                         Region* updatedRegion);
     */
 
+    // needNoDataUpdate() returns true when an update without any
+    // framebuffer changes need to be sent (using writeNoDataUpdate()).
+    // Commonly this is an update that modifies the size of the framebuffer
+    // or the screen layout.
+    virtual bool needNoDataUpdate();
+
+    // writeNoDataUpdate() write a framebuffer update containing only
+    // pseudo-rectangles.
+    virtual void writeNoDataUpdate();
+
     // writeRects() accepts an UpdateInfo (changed & copied regions) and an
     // ImageGetter to fetch pixels from.  It then calls writeCopyRect() and
     // writeRect() as appropriate.  writeFramebufferUpdateStart() must be used