Blame SOURCES/tigervnc-provide-correct-dimensions-for-xshm-setup.patch

12537a
diff --git a/vncviewer/PlatformPixelBuffer.cxx b/vncviewer/PlatformPixelBuffer.cxx
12537a
index 2b934c5..3d47163 100644
12537a
--- a/vncviewer/PlatformPixelBuffer.cxx
12537a
+++ b/vncviewer/PlatformPixelBuffer.cxx
12537a
@@ -43,7 +43,7 @@ PlatformPixelBuffer::PlatformPixelBuffer(int width, int height) :
12537a
 #endif
12537a
 {
12537a
 #if !defined(WIN32) && !defined(__APPLE__)
12537a
-  if (!setupShm()) {
12537a
+  if (!setupShm(width, height)) {
12537a
     xim = XCreateImage(fl_display, CopyFromParent, 32,
12537a
                        ZPixmap, 0, 0, width, height, 32, 0);
12537a
     if (!xim)
12537a
@@ -139,7 +139,7 @@ static int XShmAttachErrorHandler(Display *dpy, XErrorEvent *error)
12537a
   return 0;
12537a
 }
12537a
 
12537a
-bool PlatformPixelBuffer::setupShm()
12537a
+bool PlatformPixelBuffer::setupShm(int width, int height)
12537a
 {
12537a
   int major, minor;
12537a
   Bool pixmaps;
12537a
@@ -156,7 +156,7 @@ bool PlatformPixelBuffer::setupShm()
12537a
   shminfo = new XShmSegmentInfo;
12537a
 
12537a
   xim = XShmCreateImage(fl_display, CopyFromParent, 32,
12537a
-                        ZPixmap, 0, shminfo, width(), height());
12537a
+                        ZPixmap, 0, shminfo, width, height);
12537a
   if (!xim)
12537a
     goto free_shminfo;
12537a
 
12537a
diff --git a/vncviewer/PlatformPixelBuffer.h b/vncviewer/PlatformPixelBuffer.h
12537a
index f9038cd..ec439f6 100644
12537a
--- a/vncviewer/PlatformPixelBuffer.h
12537a
+++ b/vncviewer/PlatformPixelBuffer.h
12537a
@@ -53,7 +53,7 @@ protected:
12537a
 
12537a
 #if !defined(WIN32) && !defined(__APPLE__)
12537a
 protected:
12537a
-  bool setupShm();
12537a
+  bool setupShm(int width, int height);
12537a
 
12537a
 protected:
12537a
   XShmSegmentInfo *shminfo;