vnc4 (4.1.1+X4.3.0-37) unix/xc/programs/Xserver/vnc/XserverDesktop.cc

Summary

 unix/xc/programs/Xserver/vnc/XserverDesktop.cc |    7 +++++++
 1 file changed, 7 insertions(+)

    
download this patch

Patch contents

--- vnc4-4.1.1+X4.3.0.orig/unix/xc/programs/Xserver/vnc/XserverDesktop.cc
+++ vnc4-4.1.1+X4.3.0/unix/xc/programs/Xserver/vnc/XserverDesktop.cc
@@ -193,6 +193,9 @@
   else
     data = new rdr::U8[pScreen->width * pScreen->height * (format.bpp/8)];
   colourmap = this;
+#ifdef RANDR
+  initialWidth = width_;
+#endif
 
   serverReset(pScreen);
 
@@ -714,7 +717,11 @@
   grabbing = true;
 
   int bytesPerPixel = format.bpp/8;
+#ifdef RANDR
+  int bytesPerRow = initialWidth * bytesPerPixel;
+#else
   int bytesPerRow = pScreen->width * bytesPerPixel;
+#endif
 
   std::vector<rfb::Rect> rects;
   std::vector<rfb::Rect>::iterator i;