[autotests] Use DMZ-White as cursor theme

On build.kde.org we cannot use the breeze cursor theme. Instead we have
DMZ-White (debian package dmz-cursor-theme).

This change adjusts the PointerInput test to enforce DMZ-White and uses
SizeAllCursor instead of OpenHandCursor as that one seems to be missing
in that theme.

Hopefully with these changes the test starts to pass on build.kde.org.
This commit is contained in:
Martin Gräßlin 2016-04-05 08:36:53 +02:00
parent 95c8af33b5
commit 09dd9153d8

View file

@ -96,8 +96,8 @@ void PointerInputTest::initTestCase()
kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig)); kwinApp()->setConfig(KSharedConfig::openConfig(QString(), KConfig::SimpleConfig));
qputenv("XCURSOR_THEME", QByteArrayLiteral("breeze_cursors")); qputenv("XCURSOR_THEME", QByteArrayLiteral("DMZ-White"));
qputenv("XCURSOR_SIZE", QByteArrayLiteral("32")); qputenv("XCURSOR_SIZE", QByteArrayLiteral("24"));
kwinApp()->start(); kwinApp()->start();
QVERIFY(workspaceCreatedSpy.wait()); QVERIFY(workspaceCreatedSpy.wait());
@ -908,19 +908,19 @@ void PointerInputTest::testEffectOverrideCursorImage()
// now create an effect and set an override cursor // now create an effect and set an override cursor
QScopedPointer<HelperEffect> effect(new HelperEffect); QScopedPointer<HelperEffect> effect(new HelperEffect);
effects->startMouseInterception(effect.data(), Qt::OpenHandCursor); effects->startMouseInterception(effect.data(), Qt::SizeAllCursor);
const QImage openHand = p->cursorImage(); const QImage sizeAll = p->cursorImage();
QVERIFY(!openHand.isNull()); QVERIFY(!sizeAll.isNull());
QVERIFY(openHand != fallback); QVERIFY(sizeAll != fallback);
QVERIFY(leftSpy.wait()); QVERIFY(leftSpy.wait());
// let's change to arrow cursor, this should be our fallback // let's change to arrow cursor, this should be our fallback
effects->defineCursor(Qt::ArrowCursor); effects->defineCursor(Qt::ArrowCursor);
QCOMPARE(p->cursorImage(), fallback); QCOMPARE(p->cursorImage(), fallback);
// back to openhand // back to size all
effects->defineCursor(Qt::OpenHandCursor); effects->defineCursor(Qt::SizeAllCursor);
QCOMPARE(p->cursorImage(), openHand); QCOMPARE(p->cursorImage(), sizeAll);
// move cursor outside the window area // move cursor outside the window area
Cursor::setPos(800, 800); Cursor::setPos(800, 800);
@ -929,8 +929,8 @@ void PointerInputTest::testEffectOverrideCursorImage()
QCOMPARE(p->cursorImage(), fallback); QCOMPARE(p->cursorImage(), fallback);
// start mouse interception again // start mouse interception again
effects->startMouseInterception(effect.data(), Qt::OpenHandCursor); effects->startMouseInterception(effect.data(), Qt::SizeAllCursor);
QCOMPARE(p->cursorImage(), openHand); QCOMPARE(p->cursorImage(), sizeAll);
// move cursor to area of window // move cursor to area of window
Cursor::setPos(window->geometry().center()); Cursor::setPos(window->geometry().center());