diff --git a/autotests/integration/activation_test.cpp b/autotests/integration/activation_test.cpp index 571f3194cf..08625a7694 100644 --- a/autotests/integration/activation_test.cpp +++ b/autotests/integration/activation_test.cpp @@ -66,7 +66,7 @@ void ActivationTest::init() { QVERIFY(Test::setupWaylandConnection()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index 23a2f22bdd..e3bb701c8b 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -76,7 +76,7 @@ void ActivitiesTest::cleanupTestCase() void ActivitiesTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/decoration_input_test.cpp b/autotests/integration/decoration_input_test.cpp index 2ad112d68c..d53e24c093 100644 --- a/autotests/integration/decoration_input_test.cpp +++ b/autotests/integration/decoration_input_test.cpp @@ -150,7 +150,7 @@ void DecorationInputTest::init() QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat | Test::AdditionalWaylandInterface::Decoration)); QVERIFY(Test::waitForWaylandPointer()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/desktop_window_x11_test.cpp b/autotests/integration/desktop_window_x11_test.cpp index 712c2a3275..175c3acd58 100644 --- a/autotests/integration/desktop_window_x11_test.cpp +++ b/autotests/integration/desktop_window_x11_test.cpp @@ -60,7 +60,7 @@ void X11DesktopWindowTest::initTestCase() void X11DesktopWindowTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp index 703cac09bb..fc132cdc2a 100644 --- a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp +++ b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp @@ -71,7 +71,7 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase() void DontCrashAuroraeDestroyDecoTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp index b567ae8f2f..4caaa6caeb 100644 --- a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp +++ b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp @@ -43,7 +43,7 @@ void DontCrashCursorPhysicalSizeEmpty::init() { QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/dont_crash_empty_deco.cpp b/autotests/integration/dont_crash_empty_deco.cpp index 72c8d021ba..1fe94d0fac 100644 --- a/autotests/integration/dont_crash_empty_deco.cpp +++ b/autotests/integration/dont_crash_empty_deco.cpp @@ -62,7 +62,7 @@ void DontCrashEmptyDecorationTest::initTestCase() void DontCrashEmptyDecorationTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/dont_crash_no_border.cpp b/autotests/integration/dont_crash_no_border.cpp index 2d78b7920e..e758111b80 100644 --- a/autotests/integration/dont_crash_no_border.cpp +++ b/autotests/integration/dont_crash_no_border.cpp @@ -74,7 +74,7 @@ void DontCrashNoBorder::init() { QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/dont_crash_useractions_menu.cpp b/autotests/integration/dont_crash_useractions_menu.cpp index 1bea2fba4b..dd217dbdde 100644 --- a/autotests/integration/dont_crash_useractions_menu.cpp +++ b/autotests/integration/dont_crash_useractions_menu.cpp @@ -67,8 +67,8 @@ void TestDontCrashUseractionsMenu::init() { QVERIFY(Test::setupWaylandConnection()); - screens()->setCurrent(0); - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + screens()->setCurrent(QPoint(640, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TestDontCrashUseractionsMenu::cleanup() diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index 18a7b1497a..96c3ca07b2 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -74,7 +74,7 @@ void GlobalShortcutsTest::initTestCase() void GlobalShortcutsTest::init() { QVERIFY(Test::setupWaylandConnection()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); auto xkb = input()->keyboard()->xkb(); diff --git a/autotests/integration/input_stacking_order.cpp b/autotests/integration/input_stacking_order.cpp index b401387906..5c0a9a4418 100644 --- a/autotests/integration/input_stacking_order.cpp +++ b/autotests/integration/input_stacking_order.cpp @@ -71,7 +71,7 @@ void InputStackingOrderTest::init() QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat)); QVERIFY(Test::waitForWaylandPointer()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index 30aafe9b2b..ea3c44c853 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -91,8 +91,8 @@ void InputMethodTest::init() Test::AdditionalWaylandInterface::TextInputManagerV3)); - screens()->setCurrent(0); - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + screens()->setCurrent(QPoint(640, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); InputMethod::self()->setEnabled(true); } diff --git a/autotests/integration/kwinbindings_test.cpp b/autotests/integration/kwinbindings_test.cpp index e114157076..07b707d1d1 100644 --- a/autotests/integration/kwinbindings_test.cpp +++ b/autotests/integration/kwinbindings_test.cpp @@ -62,7 +62,7 @@ void KWinBindingsTest::initTestCase() void KWinBindingsTest::init() { QVERIFY(Test::setupWaylandConnection()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/layershellv1client_test.cpp b/autotests/integration/layershellv1client_test.cpp index 0366eb9e88..9a1e7e6637 100644 --- a/autotests/integration/layershellv1client_test.cpp +++ b/autotests/integration/layershellv1client_test.cpp @@ -71,7 +71,7 @@ void LayerShellV1ClientTest::init() { QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::LayerShellV1)); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index f82ae8fceb..5259d11839 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -202,7 +202,7 @@ void LockScreenTest::init() m_shm = Test::waylandShmPool(); m_seat = Test::waylandSeat(); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/maximize_test.cpp b/autotests/integration/maximize_test.cpp index ea5bfc89a7..e150eaf5a3 100644 --- a/autotests/integration/maximize_test.cpp +++ b/autotests/integration/maximize_test.cpp @@ -70,8 +70,8 @@ void TestMaximized::init() Test::AdditionalWaylandInterface::XdgDecorationV1 | Test::AdditionalWaylandInterface::PlasmaShell)); - screens()->setCurrent(0); - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + screens()->setCurrent(QPoint(640, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TestMaximized::cleanup() diff --git a/autotests/integration/modifier_only_shortcut_test.cpp b/autotests/integration/modifier_only_shortcut_test.cpp index f6cc40d89e..ac1dcb87d3 100644 --- a/autotests/integration/modifier_only_shortcut_test.cpp +++ b/autotests/integration/modifier_only_shortcut_test.cpp @@ -95,7 +95,7 @@ void ModifierOnlyShortcutTest::initTestCase() void ModifierOnlyShortcutTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index efdae9187e..ab9710753e 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -97,7 +97,7 @@ void MoveResizeWindowTest::init() m_connection = Test::waylandConnection(); m_compositor = Test::waylandCompositor(); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); } void MoveResizeWindowTest::cleanup() diff --git a/autotests/integration/no_global_shortcuts_test.cpp b/autotests/integration/no_global_shortcuts_test.cpp index 269da62fdb..83946a8c17 100644 --- a/autotests/integration/no_global_shortcuts_test.cpp +++ b/autotests/integration/no_global_shortcuts_test.cpp @@ -105,7 +105,7 @@ void NoGlobalShortcutsTest::initTestCase() void NoGlobalShortcutsTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/outputmanagement_test.cpp b/autotests/integration/outputmanagement_test.cpp index c7501bb233..7c9aba4928 100644 --- a/autotests/integration/outputmanagement_test.cpp +++ b/autotests/integration/outputmanagement_test.cpp @@ -76,9 +76,9 @@ void TestOutputManagement::init() QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::OutputManagement | Test::AdditionalWaylandInterface::OutputDevice)); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); //put mouse in the middle of screen one - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TestOutputManagement::cleanup() diff --git a/autotests/integration/placement_test.cpp b/autotests/integration/placement_test.cpp index 7f03ce037e..b4c28d8144 100644 --- a/autotests/integration/placement_test.cpp +++ b/autotests/integration/placement_test.cpp @@ -65,8 +65,8 @@ void TestPlacement::init() { QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::PlasmaShell)); - screens()->setCurrent(0); - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + screens()->setCurrent(QPoint(640, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TestPlacement::cleanup() diff --git a/autotests/integration/plasmawindow_test.cpp b/autotests/integration/plasmawindow_test.cpp index dcf432da2a..18f9c4629c 100644 --- a/autotests/integration/plasmawindow_test.cpp +++ b/autotests/integration/plasmawindow_test.cpp @@ -79,7 +79,7 @@ void PlasmaWindowTest::init() m_windowManagement = Test::waylandWindowManagement(); m_compositor = Test::waylandCompositor(); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/pointer_constraints_test.cpp b/autotests/integration/pointer_constraints_test.cpp index ee31b18c90..0e69b8ce24 100644 --- a/autotests/integration/pointer_constraints_test.cpp +++ b/autotests/integration/pointer_constraints_test.cpp @@ -85,8 +85,8 @@ void TestPointerConstraints::init() QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat | Test::AdditionalWaylandInterface::PointerConstraints)); QVERIFY(Test::waitForWaylandPointer()); - screens()->setCurrent(0); - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + screens()->setCurrent(QPoint(640, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TestPointerConstraints::cleanup() diff --git a/autotests/integration/pointer_input.cpp b/autotests/integration/pointer_input.cpp index 29069351c5..a7a9bf9491 100644 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -165,7 +165,7 @@ void PointerInputTest::init() m_compositor = Test::waylandCompositor(); m_seat = Test::waylandSeat(); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index 0ab6c7e378..8598b0c58b 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -110,7 +110,7 @@ void QuickTilingTest::init() m_connection = Test::waylandConnection(); m_compositor = Test::waylandCompositor(); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/screen_changes_test.cpp b/autotests/integration/screen_changes_test.cpp index 7c23c3caf2..0747135179 100644 --- a/autotests/integration/screen_changes_test.cpp +++ b/autotests/integration/screen_changes_test.cpp @@ -49,7 +49,7 @@ void ScreenChangesTest::init() { QVERIFY(Test::setupWaylandConnection()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/screenedge_client_show_test.cpp b/autotests/integration/screenedge_client_show_test.cpp index d66ae073fc..80a00af7e4 100644 --- a/autotests/integration/screenedge_client_show_test.cpp +++ b/autotests/integration/screenedge_client_show_test.cpp @@ -66,7 +66,7 @@ void ScreenEdgeClientShowTest::initTestCase() void ScreenEdgeClientShowTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); QVERIFY(waylandServer()->clients().isEmpty()); } diff --git a/autotests/integration/screens_test.cpp b/autotests/integration/screens_test.cpp index 60fb030781..2f7d7e1ee5 100644 --- a/autotests/integration/screens_test.cpp +++ b/autotests/integration/screens_test.cpp @@ -66,7 +66,7 @@ void ScreensTest::initTestCase() void ScreensTest::init() { - Screens::self()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); QVERIFY(Test::setupWaylandConnection()); @@ -229,9 +229,11 @@ void ScreensTest::testCurrent() QVERIFY(currentChangedSpy.isValid()); QFETCH(int, current); + AbstractOutput *output = kwinApp()->platform()->findOutput(current); + screens()->setCurrentFollowsMouse(false); - screens()->setCurrent(current); - QCOMPARE(screens()->current(), current); + screens()->setCurrent(output); + QCOMPARE(screens()->currentOutput(), output); QTEST(!currentChangedSpy.isEmpty(), "signal"); } @@ -253,7 +255,7 @@ void ScreensTest::testCurrentClient() // if the window is sent to another screen, that screen will become current client->sendToOutput(outputs[1]); QCOMPARE(currentChangedSpy.count(), 1); - QCOMPARE(screens()->current(), 1); + QCOMPARE(screens()->currentOutput(), outputs[1]); // setting current with the same client again should not change screens()->setCurrent(client); @@ -262,20 +264,20 @@ void ScreensTest::testCurrentClient() // and it should even still be on screen 1 if we make the client non-current again workspace()->setActiveClient(nullptr); client->setActive(false); - QCOMPARE(screens()->current(), 1); + QCOMPARE(screens()->currentOutput(), outputs[1]); // it's not the active client, so changing won't work screens()->setCurrent(client); client->sendToOutput(outputs[0]); QCOMPARE(currentChangedSpy.count(), 1); - QCOMPARE(screens()->current(), 1); + QCOMPARE(screens()->currentOutput(), outputs[1]); } void ScreensTest::testCurrentWithFollowsMouse_data() { QTest::addColumn>("geometries"); QTest::addColumn("cursorPos"); - QTest::addColumn("expected"); + QTest::addColumn("expectedId"); QTest::newRow("empty") << QVector{{QRect()}} << QPoint(100, 100) << 0; QTest::newRow("cloned") << QVector{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0; @@ -289,7 +291,6 @@ void ScreensTest::testCurrentWithFollowsMouse() QSignalSpy changedSpy(screens(), &Screens::changed); QVERIFY(changedSpy.isValid()); screens()->setCurrentFollowsMouse(true); - QCOMPARE(screens()->current(), 0); QFETCH(QVector, geometries); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::QueuedConnection, @@ -298,14 +299,17 @@ void ScreensTest::testCurrentWithFollowsMouse() QFETCH(QPoint, cursorPos); KWin::Cursors::self()->mouse()->setPos(cursorPos); - QTEST(screens()->current(), "expected"); + + QFETCH(int, expectedId); + AbstractOutput *expected = kwinApp()->platform()->findOutput(expectedId); + QCOMPARE(screens()->currentOutput(), expected); } void ScreensTest::testCurrentPoint_data() { QTest::addColumn>("geometries"); QTest::addColumn("cursorPos"); - QTest::addColumn("expected"); + QTest::addColumn("expectedId"); QTest::newRow("empty") << QVector{{QRect()}} << QPoint(100, 100) << 0; QTest::newRow("cloned") << QVector{{QRect{0, 0, 200, 100}, QRect{0, 0, 200, 100}}} << QPoint(50, 50) << 0; @@ -328,7 +332,10 @@ void ScreensTest::testCurrentPoint() QFETCH(QPoint, cursorPos); screens()->setCurrent(cursorPos); - QTEST(screens()->current(), "expected"); + + QFETCH(int, expectedId); + AbstractOutput *expected = kwinApp()->platform()->findOutput(expectedId); + QCOMPARE(screens()->currentOutput(), expected); } } // namespace KWin diff --git a/autotests/integration/shade_test.cpp b/autotests/integration/shade_test.cpp index e605904265..50b25755a8 100644 --- a/autotests/integration/shade_test.cpp +++ b/autotests/integration/shade_test.cpp @@ -55,7 +55,7 @@ void ShadeTest::initTestCase() void ShadeTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/struts_test.cpp b/autotests/integration/struts_test.cpp index 533efbcb3d..a8a49ba5d5 100644 --- a/autotests/integration/struts_test.cpp +++ b/autotests/integration/struts_test.cpp @@ -88,7 +88,7 @@ void StrutsTest::init() m_compositor = Test::waylandCompositor(); m_plasmaShell = Test::waylandPlasmaShell(); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); QVERIFY(waylandServer()->clients().isEmpty()); } diff --git a/autotests/integration/tabbox_test.cpp b/autotests/integration/tabbox_test.cpp index ae655c2e6a..759ff7d62b 100644 --- a/autotests/integration/tabbox_test.cpp +++ b/autotests/integration/tabbox_test.cpp @@ -61,7 +61,7 @@ void TabBoxTest::initTestCase() void TabBoxTest::init() { QVERIFY(Test::setupWaylandConnection()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/touch_input_test.cpp b/autotests/integration/touch_input_test.cpp index 2fb67dbc99..0a33fd867e 100644 --- a/autotests/integration/touch_input_test.cpp +++ b/autotests/integration/touch_input_test.cpp @@ -71,8 +71,8 @@ void TouchInputTest::init() QVERIFY(m_touch); QVERIFY(m_touch->isValid()); - screens()->setCurrent(0); - Cursors::self()->mouse()->setPos(QPoint(512, 512)); + screens()->setCurrent(QPoint(640, 512)); + Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TouchInputTest::cleanup() diff --git a/autotests/integration/transient_placement.cpp b/autotests/integration/transient_placement.cpp index 19f84a7378..33035e200e 100644 --- a/autotests/integration/transient_placement.cpp +++ b/autotests/integration/transient_placement.cpp @@ -80,7 +80,7 @@ void TransientPlacementTest::init() { QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration | Test::AdditionalWaylandInterface::PlasmaShell)); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); } diff --git a/autotests/integration/virtual_desktop_test.cpp b/autotests/integration/virtual_desktop_test.cpp index 92bed5e7a1..4fe1191a5c 100644 --- a/autotests/integration/virtual_desktop_test.cpp +++ b/autotests/integration/virtual_desktop_test.cpp @@ -65,7 +65,7 @@ void VirtualDesktopTest::initTestCase() void VirtualDesktopTest::init() { QVERIFY(Test::setupWaylandConnection()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); VirtualDesktopManager::self()->setCount(1); } diff --git a/autotests/integration/window_rules_test.cpp b/autotests/integration/window_rules_test.cpp index 05f4c0e97e..d7974eb8d0 100644 --- a/autotests/integration/window_rules_test.cpp +++ b/autotests/integration/window_rules_test.cpp @@ -59,7 +59,7 @@ void WindowRuleTest::initTestCase() void WindowRuleTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); QVERIFY(waylandServer()->clients().isEmpty()); } diff --git a/autotests/integration/window_selection_test.cpp b/autotests/integration/window_selection_test.cpp index 2869062820..88d91b2b43 100644 --- a/autotests/integration/window_selection_test.cpp +++ b/autotests/integration/window_selection_test.cpp @@ -73,8 +73,8 @@ void TestWindowSelection::init() QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat)); QVERIFY(Test::waitForWaylandPointer()); - screens()->setCurrent(0); - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + screens()->setCurrent(QPoint(640, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TestWindowSelection::cleanup() diff --git a/autotests/integration/xdgshellclient_rules_test.cpp b/autotests/integration/xdgshellclient_rules_test.cpp index 56f98eac74..cc5dd10cc1 100644 --- a/autotests/integration/xdgshellclient_rules_test.cpp +++ b/autotests/integration/xdgshellclient_rules_test.cpp @@ -155,7 +155,7 @@ void TestXdgShellClientRules::init() VirtualDesktopManager::self()->setCurrent(VirtualDesktopManager::self()->desktops().first()); QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); } void TestXdgShellClientRules::cleanup() diff --git a/autotests/integration/xdgshellclient_test.cpp b/autotests/integration/xdgshellclient_test.cpp index 322491ce3c..e564679f8e 100644 --- a/autotests/integration/xdgshellclient_test.cpp +++ b/autotests/integration/xdgshellclient_test.cpp @@ -193,9 +193,9 @@ void TestXdgShellClient::init() Test::AdditionalWaylandInterface::AppMenu)); QVERIFY(Test::waitForWaylandPointer()); - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); //put mouse in the middle of screen one - KWin::Cursors::self()->mouse()->setPos(QPoint(512, 512)); + KWin::Cursors::self()->mouse()->setPos(QPoint(640, 512)); } void TestXdgShellClient::cleanup() diff --git a/autotests/integration/xwayland_input_test.cpp b/autotests/integration/xwayland_input_test.cpp index 49bdc9aa55..35a921b107 100644 --- a/autotests/integration/xwayland_input_test.cpp +++ b/autotests/integration/xwayland_input_test.cpp @@ -59,7 +59,7 @@ void XWaylandInputTest::initTestCase() void XWaylandInputTest::init() { - screens()->setCurrent(0); + screens()->setCurrent(QPoint(640, 512)); Cursors::self()->mouse()->setPos(QPoint(640, 512)); xcb_warp_pointer(connection(), XCB_WINDOW_NONE, kwinApp()->x11RootWindow(), 0, 0, 0, 0, 640, 512); xcb_flush(connection());