From 57a8d5ca502bd1527546f337fc93b20fbd1e7d43 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 29 Sep 2021 13:51:02 +0300 Subject: [PATCH] autotests: Port testQuickTiling to AbstractOutput --- autotests/integration/quick_tiling_test.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index 76b92c1bb1..ccec5c9d7b 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -548,7 +548,7 @@ void QuickTilingTest::testX11QuickTiling_data() { QTest::addColumn("mode"); QTest::addColumn("expectedGeometry"); - QTest::addColumn("screen"); + QTest::addColumn("screenId"); QTest::addColumn("modeAfterToggle"); #define FLAG(name) QuickTileMode(QuickTileFlag::name) @@ -608,9 +608,11 @@ void QuickTilingTest::testX11QuickTiling() QCOMPARE(quickTileChangedSpy.count(), 1); // quick tile to same edge again should also act like send to screen - QCOMPARE(client->screen(), 0); + const auto outputs = kwinApp()->platform()->enabledOutputs(); + QCOMPARE(client->output(), outputs[0]); client->setQuickTileMode(mode, true); - QTEST(client->screen(), "screen"); + QFETCH(int, screenId); + QCOMPARE(client->output(), outputs[screenId]); QTEST(client->quickTileMode(), "modeAfterToggle"); QCOMPARE(client->geometryRestore(), origGeo); @@ -680,7 +682,7 @@ void QuickTilingTest::testX11QuickTilingAfterVertMaximize() // vertically maximize the window client->maximize(client->maximizeMode() ^ MaximizeVertical); QCOMPARE(client->frameGeometry().width(), origGeo.width()); - QCOMPARE(client->height(), screens()->size(client->screen()).height()); + QCOMPARE(client->height(), client->output()->geometry().height()); QCOMPARE(client->geometryRestore(), origGeo); // now quick tile