From aebc322a74cd933909b47652616179bf48b75668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 26 May 2012 09:31:04 +0200 Subject: [PATCH] Fix compilation of snaphelper effect without XRender --- effects/snaphelper/snaphelper.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/effects/snaphelper/snaphelper.cpp b/effects/snaphelper/snaphelper.cpp index 003e884435..7d4be144b4 100644 --- a/effects/snaphelper/snaphelper.cpp +++ b/effects/snaphelper/snaphelper.cpp @@ -21,7 +21,9 @@ along with this program. If not, see . #include "snaphelper.h" #include "kwinglutils.h" +#ifdef KWIN_HAVE_XRENDER_COMPOSITING #include "kwinxrenderutils.h" +#endif namespace KWin { @@ -128,6 +130,7 @@ void SnapHelperEffect::postPaintScreen() glLineWidth(1.0); } if ( effects->compositingType() == XRenderCompositing ) { +#ifdef KWIN_HAVE_XRENDER_COMPOSITING for ( int i = 0; i < effects->numScreens(); i++ ) { const QRect& rect = effects->clientArea( ScreenArea, i, 0 ); int midX = rect.x() + rect.width() / 2; @@ -168,6 +171,7 @@ void SnapHelperEffect::postPaintScreen() XRenderColor c = preMultiply(QColor(128, 128, 128, m_timeline.currentValue()*128)); XRenderFillRectangles(display(), PictOpOver, effects->xrenderBufferPicture(), &c, rects, 6); } +#endif } } else if (m_window && !m_active) { if (m_window->isDeleted())