Ifdef XRender related code in Screenshot effect

For PA KWin is compiled without XRender but with Screenshot effect
causing the compile to fail.
This commit is contained in:
Martin Gräßlin 2012-03-24 08:08:12 +01:00
parent 7b3ee21cd3
commit 05198bc2b7

View file

@ -126,6 +126,7 @@ void ScreenShotEffect::postPaintScreen()
GLRenderTarget::popRenderTarget();
ScreenShotEffect::convertFromGLImage(img, width, height);
}
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
if (effects->compositingType() == XRenderCompositing) {
setXRenderOffscreen(true);
effects->drawWindow(m_scheduledScreenshot, mask, QRegion(0, 0, width, height), d);
@ -133,6 +134,7 @@ void ScreenShotEffect::postPaintScreen()
img = xRenderOffscreenTarget()->toImage().copy(0, 0, width, height);
setXRenderOffscreen(false);
}
#endif
if (m_type & INCLUDE_CURSOR) {
grabPointerImage(img, m_scheduledScreenshot->x() + left, m_scheduledScreenshot->y() + top);