diff --git a/kwin/paintredirector.h b/kwin/paintredirector.h index 8ebb755d..3c0763de 100644 --- a/kwin/paintredirector.h +++ b/kwin/paintredirector.h @@ -68,14 +68,22 @@ public: } void resizePixmaps(); - template - T topDecoPixmap() const; - template - T leftDecoPixmap() const; - template - T bottomDecoPixmap() const; - template - T rightDecoPixmap() const; + inline xcb_render_picture_t topDecoPixmap() const + { + return picture(TopPixmap); + } + inline xcb_render_picture_t leftDecoPixmap() const + { + return picture(LeftPixmap); + } + inline xcb_render_picture_t bottomDecoPixmap() const + { + return picture(BottomPixmap); + } + inline xcb_render_picture_t rightDecoPixmap() const + { + return picture(RightPixmap); + } /** * Used by Deleted::copyToDeleted() to move the PaintRedirector to the Deleted. @@ -141,34 +149,6 @@ private: QImage m_scratchImage; }; -template <> -inline -xcb_render_picture_t PaintRedirector::bottomDecoPixmap() const -{ - return picture(BottomPixmap); -} - -template <> -inline -xcb_render_picture_t PaintRedirector::leftDecoPixmap() const -{ - return picture(LeftPixmap); -} - -template <> -inline -xcb_render_picture_t PaintRedirector::rightDecoPixmap() const -{ - return picture(RightPixmap); -} - -template <> -inline -xcb_render_picture_t PaintRedirector::topDecoPixmap() const -{ - return picture(TopPixmap); -} - } // namespace #endif diff --git a/kwin/scene_xrender.cpp b/kwin/scene_xrender.cpp index 4eb88bc8..e84ed9ae 100644 --- a/kwin/scene_xrender.cpp +++ b/kwin/scene_xrender.cpp @@ -555,10 +555,10 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat } if (redirector) { redirector->ensurePixmapsPainted(); - left = redirector->leftDecoPixmap(); - top = redirector->topDecoPixmap(); - right = redirector->rightDecoPixmap(); - bottom = redirector->bottomDecoPixmap(); + left = redirector->leftDecoPixmap(); + top = redirector->topDecoPixmap(); + right = redirector->rightDecoPixmap(); + bottom = redirector->bottomDecoPixmap(); } if (!noBorder) { MAP_RECT_TO_TARGET(dtr);