diff options
Diffstat (limited to 'unix/x0vncserver/XPixelBuffer.cxx')
-rw-r--r-- | unix/x0vncserver/XPixelBuffer.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/unix/x0vncserver/XPixelBuffer.cxx b/unix/x0vncserver/XPixelBuffer.cxx index 4769b651..f0b06967 100644 --- a/unix/x0vncserver/XPixelBuffer.cxx +++ b/unix/x0vncserver/XPixelBuffer.cxx @@ -50,13 +50,8 @@ XPixelBuffer::XPixelBuffer(Display *dpy, ImageFactory &factory, ffs(m_image->xim->blue_mask) - 1); // Set up the remaining data of the parent class. - width_ = rect.width(); - height_ = rect.height(); - data = (rdr::U8 *)m_image->xim->data; - - // Calculate the distance in pixels between two subsequent scan - // lines of the framebuffer. This may differ from image width. - stride = m_image->xim->bytes_per_line * 8 / m_image->xim->bits_per_pixel; + setBuffer(rect.width(), rect.height(), (rdr::U8 *)m_image->xim->data, + m_image->xim->bytes_per_line * 8 / m_image->xim->bits_per_pixel); // Get initial screen image from the X display. m_image->get(DefaultRootWindow(m_dpy), m_offsetLeft, m_offsetTop); |