Grabbing the screen moved from PollingManager to XPixelBuffer.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2568 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/x0vncserver/XPixelBuffer.h b/unix/x0vncserver/XPixelBuffer.h
index 2f84245..b909bb8 100644
--- a/unix/x0vncserver/XPixelBuffer.h
+++ b/unix/x0vncserver/XPixelBuffer.h
@@ -59,6 +59,14 @@
// The number of pixels in a row, with padding included.
int m_stride;
+
+ // Copy pixels from the screen to the pixel buffer,
+ // for the specified rectangular area of the buffer.
+ inline void grabRect(const Rect &r) {
+ m_image->get(DefaultRootWindow(m_dpy),
+ m_offsetLeft + r.tl.x, m_offsetTop + r.tl.y,
+ r.width(), r.height(), r.tl.x, r.tl.y);
+ }
};
#endif // __XPIXELBUFFER_H__