Fix compilation of screenshot effect without XRender

This commit is contained in:
Martin Gräßlin 2012-05-26 10:24:11 +02:00
parent aebc322a74
commit f6a0c6907a

View file

@ -227,6 +227,7 @@ QString ScreenShotEffect::blitScreenshot(const QRect &geometry)
}
if (effects->compositingType() == XRenderCompositing) {
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
QPixmap buffer(geometry.size());
if (buffer.handle() == 0) {
Pixmap xpix = XCreatePixmap(display(), rootWindow(), geometry.width(), geometry.height(), 32);
@ -235,6 +236,7 @@ QString ScreenShotEffect::blitScreenshot(const QRect &geometry)
XRenderComposite(display(), PictOpSrc, effects->xrenderBufferPicture(), None, buffer.x11PictureHandle(),
0, 0, 0, 0, geometry.x(), geometry.y(), geometry.width(), geometry.height());
img = buffer.toImage();
#endif
}
KTemporaryFile temp;