Fix compilation of snaphelper effect without XRender
This commit is contained in:
parent
b40f27f54c
commit
aebc322a74
1 changed files with 4 additions and 0 deletions
|
@ -21,7 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "snaphelper.h"
|
#include "snaphelper.h"
|
||||||
|
|
||||||
#include "kwinglutils.h"
|
#include "kwinglutils.h"
|
||||||
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
#include "kwinxrenderutils.h"
|
#include "kwinxrenderutils.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -128,6 +130,7 @@ void SnapHelperEffect::postPaintScreen()
|
||||||
glLineWidth(1.0);
|
glLineWidth(1.0);
|
||||||
}
|
}
|
||||||
if ( effects->compositingType() == XRenderCompositing ) {
|
if ( effects->compositingType() == XRenderCompositing ) {
|
||||||
|
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||||
for ( int i = 0; i < effects->numScreens(); i++ ) {
|
for ( int i = 0; i < effects->numScreens(); i++ ) {
|
||||||
const QRect& rect = effects->clientArea( ScreenArea, i, 0 );
|
const QRect& rect = effects->clientArea( ScreenArea, i, 0 );
|
||||||
int midX = rect.x() + rect.width() / 2;
|
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));
|
XRenderColor c = preMultiply(QColor(128, 128, 128, m_timeline.currentValue()*128));
|
||||||
XRenderFillRectangles(display(), PictOpOver, effects->xrenderBufferPicture(), &c, rects, 6);
|
XRenderFillRectangles(display(), PictOpOver, effects->xrenderBufferPicture(), &c, rects, 6);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else if (m_window && !m_active) {
|
} else if (m_window && !m_active) {
|
||||||
if (m_window->isDeleted())
|
if (m_window->isDeleted())
|
||||||
|
|
Loading…
Reference in a new issue