Fixed a problem of not using XReadDisplay extension for parts of
images, under IRIX.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@501 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/x0vncserver/Image.cxx b/x0vncserver/Image.cxx
index 36b2de4..475cee1 100644
--- a/x0vncserver/Image.cxx
+++ b/x0vncserver/Image.cxx
@@ -417,23 +417,22 @@
 
 void IrixOverlayShmImage::get(Window wnd, int x, int y)
 {
-    XRectangle rect; 
-    unsigned long hints = XRD_TRANSPARENT | XRD_READ_POINTER;
-
-    rect.x = x;
-    rect.y = y;
-    rect.width = xim->width;
-    rect.height = xim->height;
-
-    XShmReadDisplayRects(dpy, wnd,
-                         &rect, 1, readDisplayBuf, -x, -y,
-                         hints, &hints);
+  get(wnd, x, y, xim->width, xim->height);
 }
 
 void IrixOverlayShmImage::get(Window wnd, int x, int y, int w, int h)
 {
-  // FIXME: Use XReadDisplay extension here as well!
-  XGetSubImage(dpy, wnd, x, y, w, h, AllPlanes, ZPixmap, xim, 0, 0);
+  XRectangle rect;
+  unsigned long hints = XRD_TRANSPARENT | XRD_READ_POINTER;
+
+  rect.x = x;
+  rect.y = y;
+  rect.width = w;
+  rect.height = h;
+
+  XShmReadDisplayRects(dpy, wnd,
+                       &rect, 1, readDisplayBuf, -x, -y,
+                       hints, &hints);
 }
 
 #endif // HAVE_READDISPLAY