diff --git a/autotests/integration/activation_test.cpp b/autotests/integration/activation_test.cpp index c41f23ecbf..5c3f294ba0 100644 --- a/autotests/integration/activation_test.cpp +++ b/autotests/integration/activation_test.cpp @@ -59,7 +59,7 @@ void ActivationTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ActivationTest::init() diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index cad94a7701..23a2f22bdd 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -61,7 +61,7 @@ void ActivitiesTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ActivitiesTest::cleanupTestCase() diff --git a/autotests/integration/dbus_interface_test.cpp b/autotests/integration/dbus_interface_test.cpp index e13ef09f8d..59a960ef58 100644 --- a/autotests/integration/dbus_interface_test.cpp +++ b/autotests/integration/dbus_interface_test.cpp @@ -63,7 +63,7 @@ void TestDbusInterface::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); VirtualDesktopManager::self()->setCount(4); } diff --git a/autotests/integration/debug_console_test.cpp b/autotests/integration/debug_console_test.cpp index 8c72525a88..af356a1242 100644 --- a/autotests/integration/debug_console_test.cpp +++ b/autotests/integration/debug_console_test.cpp @@ -60,7 +60,7 @@ void DebugConsoleTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void DebugConsoleTest::cleanup() diff --git a/autotests/integration/decoration_input_test.cpp b/autotests/integration/decoration_input_test.cpp index d377030c8b..ea73ab34bc 100644 --- a/autotests/integration/decoration_input_test.cpp +++ b/autotests/integration/decoration_input_test.cpp @@ -141,7 +141,7 @@ void DecorationInputTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void DecorationInputTest::init() diff --git a/autotests/integration/desktop_window_x11_test.cpp b/autotests/integration/desktop_window_x11_test.cpp index dcaa8b558c..712c2a3275 100644 --- a/autotests/integration/desktop_window_x11_test.cpp +++ b/autotests/integration/desktop_window_x11_test.cpp @@ -55,7 +55,7 @@ void X11DesktopWindowTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void X11DesktopWindowTest::init() diff --git a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp index 997d52412e..77a704a05f 100644 --- a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp +++ b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp @@ -62,7 +62,7 @@ void DontCrashAuroraeDestroyDecoTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = KWin::Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp index 62ac93bf47..f3cf350f74 100644 --- a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp +++ b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp @@ -71,7 +71,7 @@ void DontCrashCursorPhysicalSizeEmpty::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco() diff --git a/autotests/integration/dont_crash_empty_deco.cpp b/autotests/integration/dont_crash_empty_deco.cpp index 8e304bd95f..15c8b8767a 100644 --- a/autotests/integration/dont_crash_empty_deco.cpp +++ b/autotests/integration/dont_crash_empty_deco.cpp @@ -53,7 +53,7 @@ void DontCrashEmptyDecorationTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = KWin::Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/dont_crash_no_border.cpp b/autotests/integration/dont_crash_no_border.cpp index 05ee59aa8e..abb96d8dc4 100644 --- a/autotests/integration/dont_crash_no_border.cpp +++ b/autotests/integration/dont_crash_no_border.cpp @@ -63,7 +63,7 @@ void DontCrashNoBorder::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = KWin::Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/dont_crash_reinitialize_compositor.cpp b/autotests/integration/dont_crash_reinitialize_compositor.cpp index 855d3a26e6..74d0f8f50d 100644 --- a/autotests/integration/dont_crash_reinitialize_compositor.cpp +++ b/autotests/integration/dont_crash_reinitialize_compositor.cpp @@ -72,7 +72,7 @@ void DontCrashReinitializeCompositorTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = KWin::Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/dont_crash_useractions_menu.cpp b/autotests/integration/dont_crash_useractions_menu.cpp index cacdf4e00d..77d29d4c46 100644 --- a/autotests/integration/dont_crash_useractions_menu.cpp +++ b/autotests/integration/dont_crash_useractions_menu.cpp @@ -60,7 +60,7 @@ void TestDontCrashUseractionsMenu::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestDontCrashUseractionsMenu::init() diff --git a/autotests/integration/effects/desktop_switching_animation_test.cpp b/autotests/integration/effects/desktop_switching_animation_test.cpp index 36b37522cc..f8595415ac 100644 --- a/autotests/integration/effects/desktop_switching_animation_test.cpp +++ b/autotests/integration/effects/desktop_switching_animation_test.cpp @@ -65,7 +65,7 @@ void DesktopSwitchingAnimationTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/effects/maximize_animation_test.cpp b/autotests/integration/effects/maximize_animation_test.cpp index 3c80f2d732..3b486c0d20 100644 --- a/autotests/integration/effects/maximize_animation_test.cpp +++ b/autotests/integration/effects/maximize_animation_test.cpp @@ -63,7 +63,7 @@ void MaximizeAnimationTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void MaximizeAnimationTest::init() diff --git a/autotests/integration/effects/minimize_animation_test.cpp b/autotests/integration/effects/minimize_animation_test.cpp index 1001cd47f2..8195d58d2a 100644 --- a/autotests/integration/effects/minimize_animation_test.cpp +++ b/autotests/integration/effects/minimize_animation_test.cpp @@ -67,7 +67,7 @@ void MinimizeAnimationTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/effects/popup_open_close_animation_test.cpp b/autotests/integration/effects/popup_open_close_animation_test.cpp index 7e6b3a991c..45d9162314 100644 --- a/autotests/integration/effects/popup_open_close_animation_test.cpp +++ b/autotests/integration/effects/popup_open_close_animation_test.cpp @@ -73,7 +73,7 @@ void PopupOpenCloseAnimationTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void PopupOpenCloseAnimationTest::init() diff --git a/autotests/integration/effects/toplevel_open_close_animation_test.cpp b/autotests/integration/effects/toplevel_open_close_animation_test.cpp index 6e6be2cb2d..07842d668e 100644 --- a/autotests/integration/effects/toplevel_open_close_animation_test.cpp +++ b/autotests/integration/effects/toplevel_open_close_animation_test.cpp @@ -68,7 +68,7 @@ void ToplevelOpenCloseAnimationTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = KWin::Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index b5f2405136..925fb8e41f 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -68,7 +68,7 @@ void GlobalShortcutsTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void GlobalShortcutsTest::init() diff --git a/autotests/integration/idle_inhibition_test.cpp b/autotests/integration/idle_inhibition_test.cpp index 28bc559ec1..396209ff49 100644 --- a/autotests/integration/idle_inhibition_test.cpp +++ b/autotests/integration/idle_inhibition_test.cpp @@ -52,7 +52,7 @@ void TestIdleInhibition::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestIdleInhibition::init() diff --git a/autotests/integration/input_stacking_order.cpp b/autotests/integration/input_stacking_order.cpp index 0509ef9780..c86f50303b 100644 --- a/autotests/integration/input_stacking_order.cpp +++ b/autotests/integration/input_stacking_order.cpp @@ -62,7 +62,7 @@ void InputStackingOrderTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void InputStackingOrderTest::init() diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index 4fbc885fae..ed3bef14de 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -75,7 +75,7 @@ void InputMethodTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index 849de26f3e..03a19d613f 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -189,7 +189,7 @@ void InternalWindowTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void InternalWindowTest::init() diff --git a/autotests/integration/keyboard_layout_test.cpp b/autotests/integration/keyboard_layout_test.cpp index c5c003fc1e..fd221ab124 100644 --- a/autotests/integration/keyboard_layout_test.cpp +++ b/autotests/integration/keyboard_layout_test.cpp @@ -141,7 +141,7 @@ void KeyboardLayoutTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); // don't get DBus signal on one-layout configuration // QVERIFY(layoutsReconfiguredSpy.wait()); diff --git a/autotests/integration/keymap_creation_failure_test.cpp b/autotests/integration/keymap_creation_failure_test.cpp index 841fd09522..b781d909c0 100644 --- a/autotests/integration/keymap_creation_failure_test.cpp +++ b/autotests/integration/keymap_creation_failure_test.cpp @@ -62,7 +62,7 @@ void KeymapCreationFailureTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void KeymapCreationFailureTest::init() diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index 6a62de8f62..5a1409dc9b 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -364,6 +364,9 @@ bool lockScreen(); * @returns @c true if the screen could be unlocked, @c false otherwise */ bool unlockScreen(); + +void initWaylandWorkspace(); + } } diff --git a/autotests/integration/kwinbindings_test.cpp b/autotests/integration/kwinbindings_test.cpp index b6426b727c..70e3eadabd 100644 --- a/autotests/integration/kwinbindings_test.cpp +++ b/autotests/integration/kwinbindings_test.cpp @@ -56,7 +56,7 @@ void KWinBindingsTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void KWinBindingsTest::init() diff --git a/autotests/integration/layershellv1client_test.cpp b/autotests/integration/layershellv1client_test.cpp index 5245b0526c..0366eb9e88 100644 --- a/autotests/integration/layershellv1client_test.cpp +++ b/autotests/integration/layershellv1client_test.cpp @@ -64,7 +64,7 @@ void LayerShellV1ClientTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void LayerShellV1ClientTest::init() diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index 67f66a6822..5e091093ff 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -186,7 +186,7 @@ void LockScreenTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); auto scene = KWin::Compositor::self()->scene(); QVERIFY(scene); diff --git a/autotests/integration/maximize_test.cpp b/autotests/integration/maximize_test.cpp index 16ac9e2623..e7c99551af 100644 --- a/autotests/integration/maximize_test.cpp +++ b/autotests/integration/maximize_test.cpp @@ -64,7 +64,7 @@ void TestMaximized::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestMaximized::init() diff --git a/autotests/integration/modifier_only_shortcut_test.cpp b/autotests/integration/modifier_only_shortcut_test.cpp index 6a7ccfecb1..4e7676ba7d 100644 --- a/autotests/integration/modifier_only_shortcut_test.cpp +++ b/autotests/integration/modifier_only_shortcut_test.cpp @@ -90,7 +90,7 @@ void ModifierOnlyShortcutTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ModifierOnlyShortcutTest::init() diff --git a/autotests/integration/nightcolor_test.cpp b/autotests/integration/nightcolor_test.cpp index a76c02ced5..3c77ec563c 100644 --- a/autotests/integration/nightcolor_test.cpp +++ b/autotests/integration/nightcolor_test.cpp @@ -46,7 +46,7 @@ void NightColorTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); NightColorManager *manager = NightColorManager::self(); QVERIFY(manager); diff --git a/autotests/integration/no_global_shortcuts_test.cpp b/autotests/integration/no_global_shortcuts_test.cpp index 0600ed7b8d..fdca0b6a2e 100644 --- a/autotests/integration/no_global_shortcuts_test.cpp +++ b/autotests/integration/no_global_shortcuts_test.cpp @@ -100,7 +100,7 @@ void NoGlobalShortcutsTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void NoGlobalShortcutsTest::init() diff --git a/autotests/integration/outputmanagement_test.cpp b/autotests/integration/outputmanagement_test.cpp index 729d809665..7bfbf9b1d4 100644 --- a/autotests/integration/outputmanagement_test.cpp +++ b/autotests/integration/outputmanagement_test.cpp @@ -69,7 +69,7 @@ void TestOutputManagement::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestOutputManagement::init() diff --git a/autotests/integration/placement_test.cpp b/autotests/integration/placement_test.cpp index 888382361f..6622e526f1 100644 --- a/autotests/integration/placement_test.cpp +++ b/autotests/integration/placement_test.cpp @@ -94,7 +94,7 @@ void TestPlacement::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestPlacement::setPlacementPolicy(Placement::Policy policy) diff --git a/autotests/integration/plasmawindow_test.cpp b/autotests/integration/plasmawindow_test.cpp index 25945f1511..39635d0199 100644 --- a/autotests/integration/plasmawindow_test.cpp +++ b/autotests/integration/plasmawindow_test.cpp @@ -70,7 +70,7 @@ void PlasmaWindowTest::initTestCase() QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); setenv("QMLSCENE_DEVICE", "softwarecontext", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void PlasmaWindowTest::init() diff --git a/autotests/integration/pointer_constraints_test.cpp b/autotests/integration/pointer_constraints_test.cpp index b5f54335ce..eab6573e23 100644 --- a/autotests/integration/pointer_constraints_test.cpp +++ b/autotests/integration/pointer_constraints_test.cpp @@ -77,7 +77,7 @@ void TestPointerConstraints::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestPointerConstraints::init() diff --git a/autotests/integration/pointer_input.cpp b/autotests/integration/pointer_input.cpp index 97e83a5a7b..4f83fa52d6 100644 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -155,7 +155,7 @@ void PointerInputTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void PointerInputTest::init() diff --git a/autotests/integration/screen_changes_test.cpp b/autotests/integration/screen_changes_test.cpp index ea755812fc..7c23c3caf2 100644 --- a/autotests/integration/screen_changes_test.cpp +++ b/autotests/integration/screen_changes_test.cpp @@ -42,7 +42,7 @@ void ScreenChangesTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ScreenChangesTest::init() diff --git a/autotests/integration/screenedge_client_show_test.cpp b/autotests/integration/screenedge_client_show_test.cpp index eced13e161..d30368ce54 100644 --- a/autotests/integration/screenedge_client_show_test.cpp +++ b/autotests/integration/screenedge_client_show_test.cpp @@ -61,7 +61,7 @@ void ScreenEdgeClientShowTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ScreenEdgeClientShowTest::init() diff --git a/autotests/integration/screens_test.cpp b/autotests/integration/screens_test.cpp index 63552c41bf..294c3455f0 100644 --- a/autotests/integration/screens_test.cpp +++ b/autotests/integration/screens_test.cpp @@ -62,7 +62,7 @@ void ScreensTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ScreensTest::init() diff --git a/autotests/integration/scripting/minimizeall_test.cpp b/autotests/integration/scripting/minimizeall_test.cpp index 400ce85fca..271f0f63b0 100644 --- a/autotests/integration/scripting/minimizeall_test.cpp +++ b/autotests/integration/scripting/minimizeall_test.cpp @@ -56,7 +56,7 @@ void MinimizeAllScriptTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } static QString locateMainScript(const QString &pluginName) diff --git a/autotests/integration/shade_test.cpp b/autotests/integration/shade_test.cpp index 45f7c5b1a9..e605904265 100644 --- a/autotests/integration/shade_test.cpp +++ b/autotests/integration/shade_test.cpp @@ -50,7 +50,7 @@ void ShadeTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ShadeTest::init() diff --git a/autotests/integration/showing_desktop_test.cpp b/autotests/integration/showing_desktop_test.cpp index d3137ee7ea..8c199cbfaf 100644 --- a/autotests/integration/showing_desktop_test.cpp +++ b/autotests/integration/showing_desktop_test.cpp @@ -42,7 +42,7 @@ void ShowingDesktopTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void ShowingDesktopTest::init() diff --git a/autotests/integration/stacking_order_test.cpp b/autotests/integration/stacking_order_test.cpp index 21ff1a473b..534a4d0016 100644 --- a/autotests/integration/stacking_order_test.cpp +++ b/autotests/integration/stacking_order_test.cpp @@ -65,7 +65,7 @@ void StackingOrderTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void StackingOrderTest::init() diff --git a/autotests/integration/struts_test.cpp b/autotests/integration/struts_test.cpp index 0394408258..1edafb2533 100644 --- a/autotests/integration/struts_test.cpp +++ b/autotests/integration/struts_test.cpp @@ -77,7 +77,7 @@ void StrutsTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void StrutsTest::init() diff --git a/autotests/integration/tabbox_test.cpp b/autotests/integration/tabbox_test.cpp index aed2988519..cf027f37af 100644 --- a/autotests/integration/tabbox_test.cpp +++ b/autotests/integration/tabbox_test.cpp @@ -55,7 +55,7 @@ void TabBoxTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TabBoxTest::init() diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index fbda010066..c51fc9d1f8 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -947,5 +947,12 @@ bool unlockScreen() return true; } +void initWaylandWorkspace() +{ + QSignalSpy workspaceInitializedSpy(waylandServer(), &WaylandServer::initialized); + waylandServer()->initWorkspace(); + QVERIFY(workspaceInitializedSpy.count() || workspaceInitializedSpy.wait()); +} + } } diff --git a/autotests/integration/test_virtualkeyboard_dbus.cpp b/autotests/integration/test_virtualkeyboard_dbus.cpp index 7f29a73212..e0303cfde2 100644 --- a/autotests/integration/test_virtualkeyboard_dbus.cpp +++ b/autotests/integration/test_virtualkeyboard_dbus.cpp @@ -51,7 +51,7 @@ void VirtualKeyboardDBusTest::initTestCase() static_cast(kwinApp())->setInputMethodServerToStart("internal"); kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); QVERIFY(setupWaylandConnection(AdditionalWaylandInterface::Seat | AdditionalWaylandInterface::InputMethodV1 | diff --git a/autotests/integration/touch_input_test.cpp b/autotests/integration/touch_input_test.cpp index d7abec3696..cd56ced8be 100644 --- a/autotests/integration/touch_input_test.cpp +++ b/autotests/integration/touch_input_test.cpp @@ -59,7 +59,7 @@ void TouchInputTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TouchInputTest::init() diff --git a/autotests/integration/transient_placement.cpp b/autotests/integration/transient_placement.cpp index 84befaca02..475d89032f 100644 --- a/autotests/integration/transient_placement.cpp +++ b/autotests/integration/transient_placement.cpp @@ -64,7 +64,7 @@ void TransientPlacementTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TransientPlacementTest::init() diff --git a/autotests/integration/virtual_desktop_test.cpp b/autotests/integration/virtual_desktop_test.cpp index 891facc628..2b0e607a4c 100644 --- a/autotests/integration/virtual_desktop_test.cpp +++ b/autotests/integration/virtual_desktop_test.cpp @@ -49,7 +49,7 @@ void VirtualDesktopTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); if (kwinApp()->x11Connection()) { // verify the current desktop x11 property on startup, see BUG: 391034 diff --git a/autotests/integration/window_rules_test.cpp b/autotests/integration/window_rules_test.cpp index 916b1ecce0..daca108fbc 100644 --- a/autotests/integration/window_rules_test.cpp +++ b/autotests/integration/window_rules_test.cpp @@ -54,7 +54,7 @@ void WindowRuleTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void WindowRuleTest::init() diff --git a/autotests/integration/window_selection_test.cpp b/autotests/integration/window_selection_test.cpp index a553e68717..43939a97c5 100644 --- a/autotests/integration/window_selection_test.cpp +++ b/autotests/integration/window_selection_test.cpp @@ -65,7 +65,7 @@ void TestWindowSelection::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestWindowSelection::init() diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp index b389689603..e2c3a253c8 100644 --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -66,7 +66,7 @@ void X11ClientTest::initTestCase() kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); QVERIFY(KWin::Compositor::self()); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void X11ClientTest::init() diff --git a/autotests/integration/xdgshellclient_rules_test.cpp b/autotests/integration/xdgshellclient_rules_test.cpp index c6e9d5e690..e40687a6a9 100644 --- a/autotests/integration/xdgshellclient_rules_test.cpp +++ b/autotests/integration/xdgshellclient_rules_test.cpp @@ -148,7 +148,7 @@ void TestXdgShellClientRules::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestXdgShellClientRules::init() diff --git a/autotests/integration/xdgshellclient_test.cpp b/autotests/integration/xdgshellclient_test.cpp index 36e64ddc03..123073d8ae 100644 --- a/autotests/integration/xdgshellclient_test.cpp +++ b/autotests/integration/xdgshellclient_test.cpp @@ -183,7 +183,7 @@ void TestXdgShellClient::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void TestXdgShellClient::init() diff --git a/autotests/integration/xwayland_input_test.cpp b/autotests/integration/xwayland_input_test.cpp index bcb50d77f3..24392fc4c5 100644 --- a/autotests/integration/xwayland_input_test.cpp +++ b/autotests/integration/xwayland_input_test.cpp @@ -54,7 +54,7 @@ void XWaylandInputTest::initTestCase() QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); setenv("QT_QPA_PLATFORM", "wayland", true); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void XWaylandInputTest::init() diff --git a/autotests/integration/xwayland_selections_test.cpp b/autotests/integration/xwayland_selections_test.cpp index a830332c33..6440db0f2a 100644 --- a/autotests/integration/xwayland_selections_test.cpp +++ b/autotests/integration/xwayland_selections_test.cpp @@ -56,7 +56,7 @@ void XwaylandSelectionsTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); // // wait till the xclipboard sync data device is created // if (clipboardSyncDevicedCreated.empty()) { // QVERIFY(clipboardSyncDevicedCreated.wait()); diff --git a/autotests/integration/xwaylandserver_crash_test.cpp b/autotests/integration/xwaylandserver_crash_test.cpp index 0f08ada8ca..1a39a6724d 100644 --- a/autotests/integration/xwaylandserver_crash_test.cpp +++ b/autotests/integration/xwaylandserver_crash_test.cpp @@ -61,7 +61,7 @@ void XwaylandServerCrashTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } void XwaylandServerCrashTest::testCrash() diff --git a/autotests/integration/xwaylandserver_restart_test.cpp b/autotests/integration/xwaylandserver_restart_test.cpp index 6c4f85bd41..47dc6194aa 100644 --- a/autotests/integration/xwaylandserver_restart_test.cpp +++ b/autotests/integration/xwaylandserver_restart_test.cpp @@ -58,7 +58,7 @@ void XwaylandServerRestartTest::initTestCase() QCOMPARE(screens()->count(), 2); QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); - waylandServer()->initWorkspace(); + Test::initWaylandWorkspace(); } static void kwin_safe_kill(QProcess *process)