diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index ea638ebdde..edc9dcea4f 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -270,6 +270,7 @@ set( testScreenEdges_SRCS ../screens.cpp ../screenedge.cpp ../virtualdesktops.cpp + ../xcbutils.cpp # init of extensions ) kconfig_add_kcfg_files(testScreenEdges_SRCS ../settings.kcfgc) qt5_add_dbus_interface( testScreenEdges_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.freedesktop.ScreenSaver.xml screenlocker_interface) @@ -286,6 +287,13 @@ target_link_libraries(testScreenEdges KF5::GlobalAccel KF5::WindowSystem XCB::XCB + XCB::RANDR + XCB::XFIXES + XCB::SYNC + XCB::COMPOSITE + XCB::DAMAGE + XCB::GLX + XCB::SHM ) add_test(kwin_testScreenEdges testScreenEdges) diff --git a/autotests/test_screen_edges.cpp b/autotests/test_screen_edges.cpp index 2e3a2f7d83..a776d3a162 100644 --- a/autotests/test_screen_edges.cpp +++ b/autotests/test_screen_edges.cpp @@ -305,6 +305,11 @@ void TestScreenEdges::testCreatingInitialEdges() // approach windows for edges not created as screen too small s->updateLayout(); auto edgeWindows = s->windows(); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) + if (!Xcb::Extensions::self()->isRandrAvailable()) { + QEXPECT_FAIL("", "Broken on no xrandr systems in Qt 5.5", Abort); + } +#endif QCOMPARE(edgeWindows.size(), 12); auto testWindowGeometry = [&](int index) { @@ -423,6 +428,11 @@ void TestScreenEdges::testCallback() auto it = std::find_if(edges.constBegin(), edges.constEnd(), [](Edge *e) { return e->isScreenEdge() && e->isLeft() && e->approachGeometry().bottom() < 768; }); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)) + if (!Xcb::Extensions::self()->isRandrAvailable()) { + QEXPECT_FAIL("", "Broken on no xrandr systems in Qt 5.5", Abort); + } +#endif QVERIFY(it != edges.constEnd()); xcb_enter_notify_event_t event;