Fix compilation of screenshot effect without XRender
This commit is contained in:
parent
aebc322a74
commit
f6a0c6907a
1 changed files with 2 additions and 0 deletions
|
@ -227,6 +227,7 @@ QString ScreenShotEffect::blitScreenshot(const QRect &geometry)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (effects->compositingType() == XRenderCompositing) {
|
if (effects->compositingType() == XRenderCompositing) {
|
||||||
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
QPixmap buffer(geometry.size());
|
QPixmap buffer(geometry.size());
|
||||||
if (buffer.handle() == 0) {
|
if (buffer.handle() == 0) {
|
||||||
Pixmap xpix = XCreatePixmap(display(), rootWindow(), geometry.width(), geometry.height(), 32);
|
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(),
|
XRenderComposite(display(), PictOpSrc, effects->xrenderBufferPicture(), None, buffer.x11PictureHandle(),
|
||||||
0, 0, 0, 0, geometry.x(), geometry.y(), geometry.width(), geometry.height());
|
0, 0, 0, 0, geometry.x(), geometry.y(), geometry.width(), geometry.height());
|
||||||
img = buffer.toImage();
|
img = buffer.toImage();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
KTemporaryFile temp;
|
KTemporaryFile temp;
|
||||||
|
|
Loading…
Reference in a new issue