diff --git a/effects/snaphelper/snaphelper.cpp b/effects/snaphelper/snaphelper.cpp
index f2a286aa5a..2f7f0ff14d 100644
--- a/effects/snaphelper/snaphelper.cpp
+++ b/effects/snaphelper/snaphelper.cpp
@@ -23,6 +23,7 @@ along with this program. If not, see .
#include "kwinglutils.h"
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
#include "kwinxrenderutils.h"
+#include
#endif
namespace KWin
@@ -134,7 +135,7 @@ void SnapHelperEffect::postPaintScreen()
int halfWidth = m_window->width() / 2;
int halfHeight = m_window->height() / 2;
- XRectangle rects[6];
+ xcb_rectangle_t rects[6];
// Center lines
rects[0].x = rect.x() + rect.width() / 2 - 2;
rects[0].y = rect.y();
@@ -164,8 +165,9 @@ void SnapHelperEffect::postPaintScreen()
rects[5].width = 4;
rects[5].height = 2*halfHeight - 4;
- XRenderColor c = preMultiply(QColor(128, 128, 128, m_timeline.currentValue()*128));
- XRenderFillRectangles(display(), PictOpOver, effects->xrenderBufferPicture(), &c, rects, 6);
+ XRenderColor xc = preMultiply(QColor(128, 128, 128, m_timeline.currentValue()*128));
+ xcb_render_color_t c = {xc.red, xc.green, xc.blue, xc.alpha};
+ xcb_render_fill_rectangles(connection(), XCB_RENDER_PICT_OP_OVER, effects->xrenderBufferPicture(), c, 6, rects);
}
#endif
}