From 168ea98845a0f35d576a6ebbfaecb848df0420d3 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Sat, 31 Aug 2019 00:36:58 +0300 Subject: [PATCH] Rename ShellClient to XdgShellClient Summary: Rename ShellClient to XdgShellClient in order to reflect that it represents only xdg-shell clients. Test Plan: Compiles, tests still pass. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23589 --- CMakeLists.txt | 2 +- autotests/integration/CMakeLists.txt | 4 +- autotests/integration/activation_test.cpp | 60 ++-- autotests/integration/activities_test.cpp | 4 +- .../integration/buffer_size_change_test.cpp | 10 +- autotests/integration/dbus_interface_test.cpp | 16 +- autotests/integration/debug_console_test.cpp | 6 +- .../integration/decoration_input_test.cpp | 4 +- .../integration/desktop_window_x11_test.cpp | 4 +- .../dont_crash_aurorae_destroy_deco.cpp | 4 +- .../dont_crash_cancel_animation.cpp | 4 +- .../dont_crash_cursor_physical_size_empty.cpp | 4 +- .../integration/dont_crash_empty_deco.cpp | 4 +- .../integration/dont_crash_no_border.cpp | 4 +- .../dont_crash_reinitialize_compositor.cpp | 8 +- .../dont_crash_useractions_menu.cpp | 4 +- .../desktop_switching_animation_test.cpp | 6 +- autotests/integration/effects/fade_test.cpp | 4 +- .../effects/maximize_animation_test.cpp | 10 +- .../effects/minimize_animation_test.cpp | 8 +- .../popup_open_close_animation_test.cpp | 14 +- .../effects/scripted_effects_test.cpp | 16 +- .../effects/slidingpopups_test.cpp | 4 +- .../toplevel_open_close_animation_test.cpp | 14 +- .../integration/effects/translucency_test.cpp | 4 +- .../effects/windowgeometry_test.cpp | 4 +- .../integration/effects/wobbly_shade_test.cpp | 4 +- .../integration/generic_scene_opengl_test.cpp | 4 +- .../integration/globalshortcuts_test.cpp | 4 +- .../integration/idle_inhibition_test.cpp | 8 +- .../integration/input_stacking_order.cpp | 4 +- autotests/integration/internal_window.cpp | 4 +- .../integration/keyboard_layout_test.cpp | 4 +- .../keymap_creation_failure_test.cpp | 4 +- autotests/integration/kwin_wayland_test.h | 10 +- autotests/integration/kwinbindings_test.cpp | 4 +- autotests/integration/lockscreen.cpp | 4 +- autotests/integration/maximize_test.cpp | 12 +- .../integration/move_resize_window_test.cpp | 30 +- autotests/integration/placement_test.cpp | 20 +- autotests/integration/plasma_surface_test.cpp | 6 +- autotests/integration/plasmawindow_test.cpp | 12 +- .../integration/pointer_constraints_test.cpp | 4 +- autotests/integration/pointer_input.cpp | 14 +- autotests/integration/quick_tiling_test.cpp | 4 +- .../integration/scene_opengl_shadow_test.cpp | 4 +- .../scene_qpainter_shadow_test.cpp | 4 +- autotests/integration/scene_qpainter_test.cpp | 4 +- .../screenedge_client_show_test.cpp | 4 +- autotests/integration/shade_test.cpp | 4 +- .../integration/showing_desktop_test.cpp | 4 +- autotests/integration/stacking_order_test.cpp | 34 +- autotests/integration/struts_test.cpp | 8 +- autotests/integration/tabbox_test.cpp | 4 +- autotests/integration/test_helpers.cpp | 10 +- autotests/integration/touch_input_test.cpp | 4 +- autotests/integration/transient_placement.cpp | 6 +- .../integration/virtual_desktop_test.cpp | 10 +- autotests/integration/window_rules_test.cpp | 4 +- .../integration/window_selection_test.cpp | 4 +- autotests/integration/x11_client_test.cpp | 4 +- ...test.cpp => xdgshellclient_rules_test.cpp} | 326 +++++++++--------- ...lient_test.cpp => xdgshellclient_test.cpp} | 146 ++++---- autotests/integration/xwayland_input_test.cpp | 4 +- .../integration/xwayland_selections_test.cpp | 4 +- composite.cpp | 10 +- debug_console.cpp | 12 +- debug_console.h | 6 +- deleted.cpp | 4 +- effects.cpp | 24 +- effects.h | 2 +- geometry.cpp | 4 +- idle_inhibition.cpp | 16 +- idle_inhibition.h | 4 +- input.cpp | 2 +- layers.cpp | 2 +- plugins/platforms/drm/egl_stream_backend.h | 2 +- pointer_input.cpp | 2 +- popup_input_filter.cpp | 2 +- popup_input_filter.h | 2 +- scripting/scripting_model.cpp | 2 +- scripting/workspace_wrapper.cpp | 2 +- thumbnailitem.cpp | 2 +- useractions.cpp | 2 +- virtualkeyboard.cpp | 2 +- wayland_server.cpp | 42 +-- wayland_server.h | 16 +- workspace.cpp | 14 +- workspace.h | 2 +- shell_client.cpp => xdgshellclient.cpp | 226 ++++++------ shell_client.h => xdgshellclient.h | 16 +- 91 files changed, 697 insertions(+), 697 deletions(-) rename autotests/integration/{shell_client_rules_test.cpp => xdgshellclient_rules_test.cpp} (95%) rename autotests/integration/{shell_client_test.cpp => xdgshellclient_test.cpp} (92%) rename shell_client.cpp => xdgshellclient.cpp (90%) rename shell_client.h => xdgshellclient.h (96%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fc864567b..d8f2c7d925 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,7 +475,6 @@ set(kwin_KDEINIT_SRCS scripting/timer.cpp scripting/workspace_wrapper.cpp shadow.cpp - shell_client.cpp sm.cpp thumbnailitem.cpp toplevel.cpp @@ -496,6 +495,7 @@ set(kwin_KDEINIT_SRCS workspace.cpp x11eventfilter.cpp xcbutils.cpp + xdgshellclient.cpp xkb.cpp xwl/xwayland_interface.cpp ) diff --git a/autotests/integration/CMakeLists.txt b/autotests/integration/CMakeLists.txt index 42928f5bbc..433785a145 100644 --- a/autotests/integration/CMakeLists.txt +++ b/autotests/integration/CMakeLists.txt @@ -33,7 +33,7 @@ integrationTest(NAME testDebugConsole SRCS debug_console_test.cpp) integrationTest(NAME testDontCrashEmptyDeco SRCS dont_crash_empty_deco.cpp) integrationTest(WAYLAND_ONLY NAME testPlasmaSurface SRCS plasma_surface_test.cpp) integrationTest(WAYLAND_ONLY NAME testMaximized SRCS maximize_test.cpp) -integrationTest(WAYLAND_ONLY NAME testShellClient SRCS shell_client_test.cpp) +integrationTest(WAYLAND_ONLY NAME testXdgShellClient SRCS xdgshellclient_test.cpp) integrationTest(WAYLAND_ONLY NAME testDontCrashNoBorder SRCS dont_crash_no_border.cpp) integrationTest(NAME testXwaylandSelections SRCS xwayland_selections_test.cpp) integrationTest(WAYLAND_ONLY NAME testSceneOpenGL SRCS scene_opengl_test.cpp generic_scene_opengl_test.cpp) @@ -51,7 +51,7 @@ integrationTest(WAYLAND_ONLY NAME testShowingDesktop SRCS showing_desktop_test.c integrationTest(WAYLAND_ONLY NAME testDontCrashUseractionsMenu SRCS dont_crash_useractions_menu.cpp) integrationTest(WAYLAND_ONLY NAME testKWinBindings SRCS kwinbindings_test.cpp) integrationTest(WAYLAND_ONLY NAME testVirtualDesktop SRCS virtual_desktop_test.cpp) -integrationTest(WAYLAND_ONLY NAME testShellClientRules SRCS shell_client_rules_test.cpp) +integrationTest(WAYLAND_ONLY NAME testXdgShellClientRules SRCS xdgshellclient_rules_test.cpp) integrationTest(WAYLAND_ONLY NAME testIdleInhibition SRCS idle_inhibition_test.cpp) integrationTest(WAYLAND_ONLY NAME testColorCorrectNightColor SRCS colorcorrect_nightcolor_test.cpp) integrationTest(WAYLAND_ONLY NAME testDontCrashCursorPhysicalSizeEmpty SRCS dont_crash_cursor_physical_size_empty.cpp) diff --git a/autotests/integration/activation_test.cpp b/autotests/integration/activation_test.cpp index 9aab46d487..d09a7d2c1d 100644 --- a/autotests/integration/activation_test.cpp +++ b/autotests/integration/activation_test.cpp @@ -23,9 +23,9 @@ along with this program. If not, see . #include "cursor.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" #include "wayland_server.h" #include "workspace.h" +#include "xdgshellclient.h" #include @@ -58,7 +58,7 @@ private: void ActivationTest::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -101,13 +101,13 @@ void ActivationTest::testSwitchToWindowToLeft() // Create several clients on the left screen. QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); QVERIFY(client1); QVERIFY(client1->isActive()); QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QVERIFY(client2->isActive()); @@ -117,13 +117,13 @@ void ActivationTest::testSwitchToWindowToLeft() // Create several clients on the right screen. QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); QVERIFY(client3); QVERIFY(client3->isActive()); QScopedPointer surface4(Test::createSurface()); QScopedPointer shellSurface4(Test::createXdgShellStableSurface(surface4.data())); - ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); QVERIFY(client4); QVERIFY(client4->isActive()); @@ -169,13 +169,13 @@ void ActivationTest::testSwitchToWindowToRight() // Create several clients on the left screen. QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); QVERIFY(client1); QVERIFY(client1->isActive()); QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QVERIFY(client2->isActive()); @@ -185,13 +185,13 @@ void ActivationTest::testSwitchToWindowToRight() // Create several clients on the right screen. QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); QVERIFY(client3); QVERIFY(client3->isActive()); QScopedPointer surface4(Test::createSurface()); QScopedPointer shellSurface4(Test::createXdgShellStableSurface(surface4.data())); - ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); QVERIFY(client4); QVERIFY(client4->isActive()); @@ -237,13 +237,13 @@ void ActivationTest::testSwitchToWindowAbove() // Create several clients on the top screen. QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); QVERIFY(client1); QVERIFY(client1->isActive()); QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QVERIFY(client2->isActive()); @@ -253,13 +253,13 @@ void ActivationTest::testSwitchToWindowAbove() // Create several clients on the bottom screen. QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); QVERIFY(client3); QVERIFY(client3->isActive()); QScopedPointer surface4(Test::createSurface()); QScopedPointer shellSurface4(Test::createXdgShellStableSurface(surface4.data())); - ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); QVERIFY(client4); QVERIFY(client4->isActive()); @@ -305,13 +305,13 @@ void ActivationTest::testSwitchToWindowBelow() // Create several clients on the top screen. QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); QVERIFY(client1); QVERIFY(client1->isActive()); QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QVERIFY(client2->isActive()); @@ -321,13 +321,13 @@ void ActivationTest::testSwitchToWindowBelow() // Create several clients on the bottom screen. QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); QVERIFY(client3); QVERIFY(client3->isActive()); QScopedPointer surface4(Test::createSurface()); QScopedPointer shellSurface4(Test::createXdgShellStableSurface(surface4.data())); - ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); QVERIFY(client4); QVERIFY(client4->isActive()); @@ -374,14 +374,14 @@ void ActivationTest::testSwitchToWindowMaximized() // Create several maximized clients on the left screen. QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); QVERIFY(client1); QVERIFY(client1->isActive()); QSignalSpy configureRequestedSpy1(shellSurface1.data(), &XdgShellSurface::configureRequested); QVERIFY(configureRequestedSpy1.wait()); workspace()->slotWindowMaximize(); QVERIFY(configureRequestedSpy1.wait()); - QSignalSpy geometryChangedSpy1(client1, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy1(client1, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy1.isValid()); shellSurface1->ackConfigure(configureRequestedSpy1.last().at(2).value()); Test::render(surface1.data(), configureRequestedSpy1.last().at(0).toSize(), Qt::red); @@ -389,14 +389,14 @@ void ActivationTest::testSwitchToWindowMaximized() QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QVERIFY(client2->isActive()); QSignalSpy configureRequestedSpy2(shellSurface2.data(), &XdgShellSurface::configureRequested); QVERIFY(configureRequestedSpy2.wait()); workspace()->slotWindowMaximize(); QVERIFY(configureRequestedSpy2.wait()); - QSignalSpy geometryChangedSpy2(client2, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy2(client2, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy2.isValid()); shellSurface2->ackConfigure(configureRequestedSpy2.last().at(2).value()); Test::render(surface2.data(), configureRequestedSpy2.last().at(0).toSize(), Qt::red); @@ -410,13 +410,13 @@ void ActivationTest::testSwitchToWindowMaximized() // Create several clients on the right screen. QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); QVERIFY(client3); QVERIFY(client3->isActive()); QScopedPointer surface4(Test::createSurface()); QScopedPointer shellSurface4(Test::createXdgShellStableSurface(surface4.data())); - ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); QVERIFY(client4); QVERIFY(client4->isActive()); @@ -459,14 +459,14 @@ void ActivationTest::testSwitchToWindowFullScreen() // Create several maximized clients on the top screen. QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); QVERIFY(client1); QVERIFY(client1->isActive()); QSignalSpy configureRequestedSpy1(shellSurface1.data(), &XdgShellSurface::configureRequested); QVERIFY(configureRequestedSpy1.wait()); workspace()->slotWindowFullScreen(); QVERIFY(configureRequestedSpy1.wait()); - QSignalSpy geometryChangedSpy1(client1, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy1(client1, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy1.isValid()); shellSurface1->ackConfigure(configureRequestedSpy1.last().at(2).value()); Test::render(surface1.data(), configureRequestedSpy1.last().at(0).toSize(), Qt::red); @@ -474,14 +474,14 @@ void ActivationTest::testSwitchToWindowFullScreen() QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QVERIFY(client2->isActive()); QSignalSpy configureRequestedSpy2(shellSurface2.data(), &XdgShellSurface::configureRequested); QVERIFY(configureRequestedSpy2.wait()); workspace()->slotWindowFullScreen(); QVERIFY(configureRequestedSpy2.wait()); - QSignalSpy geometryChangedSpy2(client2, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy2(client2, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy2.isValid()); shellSurface2->ackConfigure(configureRequestedSpy2.last().at(2).value()); Test::render(surface2.data(), configureRequestedSpy2.last().at(0).toSize(), Qt::red); @@ -495,13 +495,13 @@ void ActivationTest::testSwitchToWindowFullScreen() // Create several clients on the bottom screen. QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::blue); QVERIFY(client3); QVERIFY(client3->isActive()); QScopedPointer surface4(Test::createSurface()); QScopedPointer shellSurface4(Test::createXdgShellStableSurface(surface4.data())); - ShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client4 = Test::renderAndWaitForShown(surface4.data(), QSize(100, 50), Qt::blue); QVERIFY(client4); QVERIFY(client4->isActive()); diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index 6fa465cd5c..df6d881797 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "xcbutils.h" #include @@ -58,7 +58,7 @@ private: void ActivitiesTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/buffer_size_change_test.cpp b/autotests/integration/buffer_size_change_test.cpp index 2b41eb8b2c..b0c9ffdc20 100644 --- a/autotests/integration/buffer_size_change_test.cpp +++ b/autotests/integration/buffer_size_change_test.cpp @@ -20,7 +20,7 @@ along with this program. If not, see . #include "generic_scene_opengl_test.h" #include "composite.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include @@ -61,7 +61,7 @@ void BufferSizeChangeTest::testShmBufferSizeChange() QVERIFY(!shellSurface.isNull()); // set buffer size - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); // add a first repaint @@ -73,7 +73,7 @@ void BufferSizeChangeTest::testShmBufferSizeChange() // now change buffer size Test::render(surface.data(), QSize(30, 10), Qt::red); - QSignalSpy damagedSpy(client, &ShellClient::damaged); + QSignalSpy damagedSpy(client, &XdgShellClient::damaged); QVERIFY(damagedSpy.isValid()); QVERIFY(damagedSpy.wait()); KWin::Compositor::self()->addRepaintFull(); @@ -98,7 +98,7 @@ void BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface() // set buffer sizes Test::render(surface.data(), QSize(30, 10), Qt::red); - ShellClient *parent = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue); QVERIFY(parent); // add a first repaint @@ -108,7 +108,7 @@ void BufferSizeChangeTest::testShmBufferSizeChangeOnSubSurface() QVERIFY(swapSpy.wait()); // change buffer size of sub surface - QSignalSpy damagedParentSpy(parent, &ShellClient::damaged); + QSignalSpy damagedParentSpy(parent, &XdgShellClient::damaged); QVERIFY(damagedParentSpy.isValid()); Test::render(surface.data(), QSize(20, 10), Qt::red); parentSurface->commit(Surface::CommitFlag::None); diff --git a/autotests/integration/dbus_interface_test.cpp b/autotests/integration/dbus_interface_test.cpp index 2ac4902327..079a40f113 100644 --- a/autotests/integration/dbus_interface_test.cpp +++ b/autotests/integration/dbus_interface_test.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "platform.h" #include "rules.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "virtualdesktops.h" #include "wayland_server.h" #include "workspace.h" @@ -61,15 +61,15 @@ private Q_SLOTS: void cleanup(); void testGetWindowInfoInvalidUuid(); - void testGetWindowInfoShellClient_data(); - void testGetWindowInfoShellClient(); + void testGetWindowInfoXdgShellClient_data(); + void testGetWindowInfoXdgShellClient(); void testGetWindowInfoX11Client(); }; void TestDbusInterface::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -112,7 +112,7 @@ void TestDbusInterface::testGetWindowInfoInvalidUuid() QVERIFY(windowData.empty()); } -void TestDbusInterface::testGetWindowInfoShellClient_data() +void TestDbusInterface::testGetWindowInfoXdgShellClient_data() { QTest::addColumn("type"); @@ -120,7 +120,7 @@ void TestDbusInterface::testGetWindowInfoShellClient_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestDbusInterface::testGetWindowInfoShellClient() +void TestDbusInterface::testGetWindowInfoXdgShellClient() { QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); QVERIFY(clientAddedSpy.isValid()); @@ -135,7 +135,7 @@ void TestDbusInterface::testGetWindowInfoShellClient() Test::render(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(clientAddedSpy.isEmpty()); QVERIFY(clientAddedSpy.wait()); - auto client = clientAddedSpy.first().first().value(); + auto client = clientAddedSpy.first().first().value(); QVERIFY(client); // let's get the window info @@ -226,7 +226,7 @@ void TestDbusInterface::testGetWindowInfoShellClient() // finally close window const auto id = client->internalId(); - QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed); + QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed); QVERIFY(windowClosedSpy.isValid()); shellSurface.reset(); surface.reset(); diff --git a/autotests/integration/debug_console_test.cpp b/autotests/integration/debug_console_test.cpp index 5edf5f81eb..2921400002 100644 --- a/autotests/integration/debug_console_test.cpp +++ b/autotests/integration/debug_console_test.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "internal_client.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include "xcbutils.h" @@ -60,7 +60,7 @@ void DebugConsoleTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -393,7 +393,7 @@ void DebugConsoleTest::testWaylandClient() shellSurface.reset(); Test::flushWaylandConnection(); qDebug() << rowsRemovedSpy.count(); - QEXPECT_FAIL("wlShell", "Deleting a ShellSurface does not result in the server removing the ShellClient", Continue); + QEXPECT_FAIL("wlShell", "Deleting a ShellSurface does not result in the server removing the XdgShellClient", Continue); QVERIFY(rowsRemovedSpy.wait(500)); surface.reset(); diff --git a/autotests/integration/decoration_input_test.cpp b/autotests/integration/decoration_input_test.cpp index 4f1e3b6231..11353c97e4 100644 --- a/autotests/integration/decoration_input_test.cpp +++ b/autotests/integration/decoration_input_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "touch_input.h" #include "screenedge.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include @@ -135,7 +135,7 @@ void DecorationInputTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); diff --git a/autotests/integration/desktop_window_x11_test.cpp b/autotests/integration/desktop_window_x11_test.cpp index 7b223de2ef..7ece7f5f2a 100644 --- a/autotests/integration/desktop_window_x11_test.cpp +++ b/autotests/integration/desktop_window_x11_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "xcbutils.h" #include @@ -52,7 +52,7 @@ private: void X11DesktopWindowTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp index 60c2f907cc..a7941ab86c 100644 --- a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp +++ b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "wayland_server.h" #include "workspace.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -54,7 +54,7 @@ private Q_SLOTS: void DontCrashAuroraeDestroyDecoTest::initTestCase() { qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/dont_crash_cancel_animation.cpp b/autotests/integration/dont_crash_cancel_animation.cpp index 99b96c491d..3b19fd5284 100644 --- a/autotests/integration/dont_crash_cancel_animation.cpp +++ b/autotests/integration/dont_crash_cancel_animation.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "effects.h" #include "effectloader.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include "scripting/scriptedeffect.h" @@ -56,7 +56,7 @@ private Q_SLOTS: void DontCrashCancelAnimationFromAnimationEndedTest::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); QVERIFY(waylandServer()->init(s_socketName.toLocal8Bit())); diff --git a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp index 1c9b980e3c..7661b67f97 100644 --- a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp +++ b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "cursor.h" #include "effects.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -67,7 +67,7 @@ void DontCrashCursorPhysicalSizeEmpty::cleanup() void DontCrashCursorPhysicalSizeEmpty::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/dont_crash_empty_deco.cpp b/autotests/integration/dont_crash_empty_deco.cpp index 368d27211a..6a55a5dcae 100644 --- a/autotests/integration/dont_crash_empty_deco.cpp +++ b/autotests/integration/dont_crash_empty_deco.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -50,7 +50,7 @@ private Q_SLOTS: void DontCrashEmptyDecorationTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/dont_crash_no_border.cpp b/autotests/integration/dont_crash_no_border.cpp index 530e34552e..80097d6b51 100644 --- a/autotests/integration/dont_crash_no_border.cpp +++ b/autotests/integration/dont_crash_no_border.cpp @@ -28,7 +28,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -56,7 +56,7 @@ private Q_SLOTS: void DontCrashNoBorder::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/dont_crash_reinitialize_compositor.cpp b/autotests/integration/dont_crash_reinitialize_compositor.cpp index c0137d6d70..d767e64826 100644 --- a/autotests/integration/dont_crash_reinitialize_compositor.cpp +++ b/autotests/integration/dont_crash_reinitialize_compositor.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "effects.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -60,7 +60,7 @@ void DontCrashReinitializeCompositorTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -134,7 +134,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); // Make sure that only the test effect is loaded. @@ -147,7 +147,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor() QVERIFY(!effect->isActive()); // Close the test client. - QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed); + QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed); QVERIFY(windowClosedSpy.isValid()); shellSurface.reset(); surface.reset(); diff --git a/autotests/integration/dont_crash_useractions_menu.cpp b/autotests/integration/dont_crash_useractions_menu.cpp index 093d022967..d105d7267d 100644 --- a/autotests/integration/dont_crash_useractions_menu.cpp +++ b/autotests/integration/dont_crash_useractions_menu.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "keyboard_input.h" #include "platform.h" #include "pointer_input.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "useractions.h" #include "wayland_server.h" @@ -56,7 +56,7 @@ private Q_SLOTS: void TestDontCrashUseractionsMenu::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/effects/desktop_switching_animation_test.cpp b/autotests/integration/effects/desktop_switching_animation_test.cpp index 531bfd7769..29c5d93ece 100644 --- a/autotests/integration/effects/desktop_switching_animation_test.cpp +++ b/autotests/integration/effects/desktop_switching_animation_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "effects.h" #include "platform.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -57,7 +57,7 @@ void DesktopSwitchingAnimationTest::initTestCase() qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -128,7 +128,7 @@ void DesktopSwitchingAnimationTest::testSwitchDesktops() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QCOMPARE(client->desktops().count(), 1); QCOMPARE(client->desktops().first(), VirtualDesktopManager::self()->desktops().first()); diff --git a/autotests/integration/effects/fade_test.cpp b/autotests/integration/effects/fade_test.cpp index a41885b1be..bcba46f190 100644 --- a/autotests/integration/effects/fade_test.cpp +++ b/autotests/integration/effects/fade_test.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include "effectloader.h" #include "cursor.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include "effect_builtins.h" @@ -55,7 +55,7 @@ private: void FadeTest::initTestCase() { qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/effects/maximize_animation_test.cpp b/autotests/integration/effects/maximize_animation_test.cpp index 36693cd458..86ac64aed4 100644 --- a/autotests/integration/effects/maximize_animation_test.cpp +++ b/autotests/integration/effects/maximize_animation_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "effects.h" #include "platform.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -57,7 +57,7 @@ void MaximizeAnimationTest::initTestCase() qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -133,7 +133,7 @@ void MaximizeAnimationTest::testMaximizeRestore() // Draw contents of the surface. shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QCOMPARE(client->maximizeMode(), MaximizeMode::MaximizeRestore); @@ -157,9 +157,9 @@ void MaximizeAnimationTest::testMaximizeRestore() QVERIFY(!effect->isActive()); // Maximize the client. - QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); - QSignalSpy maximizeChangedSpy(client, qOverload(&ShellClient::clientMaximizedStateChanged)); + QSignalSpy maximizeChangedSpy(client, qOverload(&XdgShellClient::clientMaximizedStateChanged)); QVERIFY(maximizeChangedSpy.isValid()); workspace()->slotWindowMaximize(); diff --git a/autotests/integration/effects/minimize_animation_test.cpp b/autotests/integration/effects/minimize_animation_test.cpp index c40fd5e24c..a548143a05 100644 --- a/autotests/integration/effects/minimize_animation_test.cpp +++ b/autotests/integration/effects/minimize_animation_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "effects.h" #include "platform.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -59,7 +59,7 @@ void MinimizeAnimationTest::initTestCase() qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -134,7 +134,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize() plasmaPanelShellSurface->setRole(PlasmaShellSurface::Role::Panel); plasmaPanelShellSurface->setPosition(panelRect.topLeft()); plasmaPanelShellSurface->setPanelBehavior(PlasmaShellSurface::PanelBehavior::AlwaysVisible); - ShellClient *panel = Test::renderAndWaitForShown(panelSurface.data(), panelRect.size(), Qt::blue); + XdgShellClient *panel = Test::renderAndWaitForShown(panelSurface.data(), panelRect.size(), Qt::blue); QVERIFY(panel); QVERIFY(panel->isDock()); QCOMPARE(panel->geometry(), panelRect); @@ -146,7 +146,7 @@ void MinimizeAnimationTest::testMinimizeUnminimize() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red); QVERIFY(client); QVERIFY(plasmaWindowCreatedSpy.wait()); QCOMPARE(plasmaWindowCreatedSpy.count(), 2); diff --git a/autotests/integration/effects/popup_open_close_animation_test.cpp b/autotests/integration/effects/popup_open_close_animation_test.cpp index 9a29871f95..de621fda75 100644 --- a/autotests/integration/effects/popup_open_close_animation_test.cpp +++ b/autotests/integration/effects/popup_open_close_animation_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "effects.h" #include "internal_client.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "useractions.h" #include "wayland_server.h" #include "workspace.h" @@ -66,7 +66,7 @@ void PopupOpenCloseAnimationTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -119,7 +119,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups() QVERIFY(!mainWindowSurface.isNull()); QScopedPointer mainWindowShellSurface(Test::createXdgShellStableSurface(mainWindowSurface.data())); QVERIFY(!mainWindowShellSurface.isNull()); - ShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue); QVERIFY(mainWindow); // Load effect that will be tested. @@ -139,7 +139,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups() positioner.setAnchorEdge(Qt::BottomEdge | Qt::LeftEdge); QScopedPointer popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), mainWindowShellSurface.data(), positioner)); QVERIFY(!popupShellSurface.isNull()); - ShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red); + XdgShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red); QVERIFY(popup); QVERIFY(popup->isPopupWindow()); QCOMPARE(popup->transientFor(), mainWindow); @@ -149,7 +149,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups() QTRY_VERIFY(!effect->isActive()); // Destroy the popup, it should not be animated. - QSignalSpy popupClosedSpy(popup, &ShellClient::windowClosed); + QSignalSpy popupClosedSpy(popup, &XdgShellClient::windowClosed); QVERIFY(popupClosedSpy.isValid()); popupShellSurface.reset(); popupSurface.reset(); @@ -181,7 +181,7 @@ void PopupOpenCloseAnimationTest::testAnimateUserActionsPopup() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); // Load effect that will be tested. @@ -236,7 +236,7 @@ void PopupOpenCloseAnimationTest::testAnimateDecorationTooltips() QScopedPointer deco(Test::xdgDecorationManager()->getToplevelDecoration(shellSurface.data())); QVERIFY(!deco.isNull()); deco->setMode(XdgDecoration::Mode::ServerSide); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(client->isDecorated()); diff --git a/autotests/integration/effects/scripted_effects_test.cpp b/autotests/integration/effects/scripted_effects_test.cpp index dab3f30359..c6025eb865 100644 --- a/autotests/integration/effects/scripted_effects_test.cpp +++ b/autotests/integration/effects/scripted_effects_test.cpp @@ -29,7 +29,7 @@ along with this program. If not, see . #include "effects.h" #include "kwin_wayland_test.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "virtualdesktops.h" #include "wayland_server.h" #include "workspace.h" @@ -143,7 +143,7 @@ bool ScriptedEffectWithDebugSpy::load(const QString &name) void ScriptedEffectsTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); @@ -511,7 +511,7 @@ void ScriptedEffectsTest::testGrab() QVERIFY(surface); XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface); QVERIFY(shellSurface); - ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); QVERIFY(c); QCOMPARE(workspace()->activeClient(), c); @@ -544,7 +544,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindow() QVERIFY(surface); XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface); QVERIFY(shellSurface); - ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); QVERIFY(c); QCOMPARE(workspace()->activeClient(), c); @@ -581,7 +581,7 @@ void ScriptedEffectsTest::testGrabAlreadyGrabbedWindowForced() QVERIFY(surface); XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface); QVERIFY(shellSurface); - ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); QVERIFY(c); QCOMPARE(workspace()->activeClient(), c); @@ -612,7 +612,7 @@ void ScriptedEffectsTest::testUngrab() QVERIFY(surface); XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface); QVERIFY(shellSurface); - ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); QVERIFY(c); QCOMPARE(workspace()->activeClient(), c); @@ -655,7 +655,7 @@ void ScriptedEffectsTest::testRedirect() QVERIFY(surface); XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface); QVERIFY(shellSurface); - ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); QVERIFY(c); QCOMPARE(workspace()->activeClient(), c); @@ -733,7 +733,7 @@ void ScriptedEffectsTest::testComplete() QVERIFY(surface); XdgShellSurface *shellSurface = Test::createXdgShellStableSurface(surface, surface); QVERIFY(shellSurface); - ShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); QVERIFY(c); QCOMPARE(workspace()->activeClient(), c); diff --git a/autotests/integration/effects/slidingpopups_test.cpp b/autotests/integration/effects/slidingpopups_test.cpp index 58e9345e5e..900bfae1e1 100644 --- a/autotests/integration/effects/slidingpopups_test.cpp +++ b/autotests/integration/effects/slidingpopups_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "cursor.h" #include "platform.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include "effect_builtins.h" @@ -61,7 +61,7 @@ private Q_SLOTS: void SlidingPopupsTest::initTestCase() { qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); diff --git a/autotests/integration/effects/toplevel_open_close_animation_test.cpp b/autotests/integration/effects/toplevel_open_close_animation_test.cpp index bcb8898bed..9cf71bdca0 100644 --- a/autotests/integration/effects/toplevel_open_close_animation_test.cpp +++ b/autotests/integration/effects/toplevel_open_close_animation_test.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "effects.h" #include "platform.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -61,7 +61,7 @@ void ToplevelOpenCloseAnimationTest::initTestCase() qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -137,7 +137,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(effect->isActive()); @@ -146,7 +146,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels() // Close the test client, the effect should start animating the disappearing // of the client. - QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed); + QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed); QVERIFY(windowClosedSpy.isValid()); shellSurface.reset(); surface.reset(); @@ -181,7 +181,7 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups() QVERIFY(!mainWindowSurface.isNull()); QScopedPointer mainWindowShellSurface(Test::createXdgShellStableSurface(mainWindowSurface.data())); QVERIFY(!mainWindowShellSurface.isNull()); - ShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *mainWindow = Test::renderAndWaitForShown(mainWindowSurface.data(), QSize(100, 50), Qt::blue); QVERIFY(mainWindow); // Load effect that will be tested. @@ -201,14 +201,14 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups() positioner.setAnchorEdge(Qt::BottomEdge | Qt::LeftEdge); QScopedPointer popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), mainWindowShellSurface.data(), positioner)); QVERIFY(!popupShellSurface.isNull()); - ShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red); + XdgShellClient *popup = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::red); QVERIFY(popup); QVERIFY(popup->isPopupWindow()); QCOMPARE(popup->transientFor(), mainWindow); QVERIFY(!effect->isActive()); // Destroy the popup, it should not be animated. - QSignalSpy popupClosedSpy(popup, &ShellClient::windowClosed); + QSignalSpy popupClosedSpy(popup, &XdgShellClient::windowClosed); QVERIFY(popupClosedSpy.isValid()); popupShellSurface.reset(); popupSurface.reset(); diff --git a/autotests/integration/effects/translucency_test.cpp b/autotests/integration/effects/translucency_test.cpp index 15b3461fff..222214217b 100644 --- a/autotests/integration/effects/translucency_test.cpp +++ b/autotests/integration/effects/translucency_test.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "effectloader.h" #include "cursor.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include "effect_builtins.h" @@ -55,7 +55,7 @@ private: void TranslucencyTest::initTestCase() { qputenv("XDG_DATA_DIRS", QCoreApplication::applicationDirPath().toUtf8()); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/effects/windowgeometry_test.cpp b/autotests/integration/effects/windowgeometry_test.cpp index 31a33e6e8e..e72c1c7d03 100644 --- a/autotests/integration/effects/windowgeometry_test.cpp +++ b/autotests/integration/effects/windowgeometry_test.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include "effectloader.h" #include "cursor.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include "effect_builtins.h" @@ -50,7 +50,7 @@ private Q_SLOTS: void WindowGeometryTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/effects/wobbly_shade_test.cpp b/autotests/integration/effects/wobbly_shade_test.cpp index d4bc220365..d205e3b318 100644 --- a/autotests/integration/effects/wobbly_shade_test.cpp +++ b/autotests/integration/effects/wobbly_shade_test.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "effectloader.h" #include "cursor.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" #include "effect_builtins.h" @@ -56,7 +56,7 @@ private Q_SLOTS: void WobblyWindowsShadeTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/generic_scene_opengl_test.cpp b/autotests/integration/generic_scene_opengl_test.cpp index 02402dde5b..f7bbd71c21 100644 --- a/autotests/integration/generic_scene_opengl_test.cpp +++ b/autotests/integration/generic_scene_opengl_test.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include "cursor.h" #include "platform.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "effect_builtins.h" @@ -49,7 +49,7 @@ void GenericSceneOpenGLTest::cleanup() void GenericSceneOpenGLTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index 382e43753d..ac26305c4a 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "internal_client.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "useractions.h" #include "wayland_server.h" #include "workspace.h" @@ -65,7 +65,7 @@ void GlobalShortcutsTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); diff --git a/autotests/integration/idle_inhibition_test.cpp b/autotests/integration/idle_inhibition_test.cpp index 1b93d0692a..e3ddd17809 100644 --- a/autotests/integration/idle_inhibition_test.cpp +++ b/autotests/integration/idle_inhibition_test.cpp @@ -19,7 +19,7 @@ along with this program. If not, see . *********************************************************************/ #include "kwin_wayland_test.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -54,7 +54,7 @@ private Q_SLOTS: void TestIdleInhibition::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -268,7 +268,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped() QCOMPARE(inhibitedSpy.count(), 1); // Unmap the client. - QSignalSpy hiddenSpy(c, &ShellClient::windowHidden); + QSignalSpy hiddenSpy(c, &XdgShellClient::windowHidden); QVERIFY(hiddenSpy.isValid()); surface->attachBuffer(Buffer::Ptr()); surface->commit(Surface::CommitFlag::None); @@ -280,7 +280,7 @@ void TestIdleInhibition::testDontInhibitWhenUnmapped() QCOMPARE(inhibitedSpy.count(), 2); // Map the client. - QSignalSpy windowShownSpy(c, &ShellClient::windowShown); + QSignalSpy windowShownSpy(c, &XdgShellClient::windowShown); QVERIFY(windowShownSpy.isValid()); Test::render(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(windowShownSpy.wait()); diff --git a/autotests/integration/input_stacking_order.cpp b/autotests/integration/input_stacking_order.cpp index bd37440723..89e9b79b27 100644 --- a/autotests/integration/input_stacking_order.cpp +++ b/autotests/integration/input_stacking_order.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -61,7 +61,7 @@ private: void InputStackingOrderTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index 7e9cbceb1d..9d4bf1f04f 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include "effects.h" #include "internal_client.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -185,7 +185,7 @@ void InternalWindowTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); diff --git a/autotests/integration/keyboard_layout_test.cpp b/autotests/integration/keyboard_layout_test.cpp index ade80f598a..054ff8bccd 100644 --- a/autotests/integration/keyboard_layout_test.cpp +++ b/autotests/integration/keyboard_layout_test.cpp @@ -21,7 +21,7 @@ along with this program. If not, see . #include "keyboard_input.h" #include "keyboard_layout.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "virtualdesktops.h" #include "wayland_server.h" #include "workspace.h" @@ -74,7 +74,7 @@ void KeyboardLayoutTest::reconfigureLayouts() void KeyboardLayoutTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/keymap_creation_failure_test.cpp b/autotests/integration/keymap_creation_failure_test.cpp index dd8d7b6411..8ec33b03a9 100644 --- a/autotests/integration/keymap_creation_failure_test.cpp +++ b/autotests/integration/keymap_creation_failure_test.cpp @@ -21,7 +21,7 @@ along with this program. If not, see . #include "keyboard_input.h" #include "keyboard_layout.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "virtualdesktops.h" #include "wayland_server.h" #include "workspace.h" @@ -57,7 +57,7 @@ void KeymapCreationFailureTest::initTestCase() qputenv("XKB_DEFAULT_VARIANT", "no"); qputenv("XKB_DEFAULT_OPTIONS", "no"); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index de307f83f3..237f20bfa7 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -58,7 +58,7 @@ class Xwayland; } class AbstractClient; -class ShellClient; +class XdgShellClient; class WaylandTestApplication : public ApplicationWaylandAbstract { @@ -181,15 +181,15 @@ void render(KWayland::Client::Surface *surface, const QSize &size, const QColor void render(KWayland::Client::Surface *surface, const QImage &img); /** - * Waits till a new ShellClient is shown and returns the created ShellClient. - * If no ShellClient gets shown during @p timeout @c null is returned. + * Waits till a new XdgShellClient is shown and returns the created XdgShellClient. + * If no XdgShellClient gets shown during @p timeout @c null is returned. */ -ShellClient *waitForWaylandWindowShown(int timeout = 5000); +XdgShellClient *waitForWaylandWindowShown(int timeout = 5000); /** * Combination of @link{render} and @link{waitForWaylandWindowShown}. */ -ShellClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32, int timeout = 5000); +XdgShellClient *renderAndWaitForShown(KWayland::Client::Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format = QImage::Format_ARGB32, int timeout = 5000); /** * Waits for the @p client to be destroyed. diff --git a/autotests/integration/kwinbindings_test.cpp b/autotests/integration/kwinbindings_test.cpp index b90ce87e68..e90790843b 100644 --- a/autotests/integration/kwinbindings_test.cpp +++ b/autotests/integration/kwinbindings_test.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "input.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "scripting/scripting.h" #include "useractions.h" #include "virtualdesktops.h" @@ -57,7 +57,7 @@ private Q_SLOTS: void KWinBindingsTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index 236000d115..857d0b8438 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -183,7 +183,7 @@ AbstractClient *LockScreenTest::showWindow() void LockScreenTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/maximize_test.cpp b/autotests/integration/maximize_test.cpp index c2085eeb8e..e951b1cfbb 100644 --- a/autotests/integration/maximize_test.cpp +++ b/autotests/integration/maximize_test.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "decorations/decorationbridge.h" #include "decorations/settings.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -61,7 +61,7 @@ private Q_SLOTS: void TestMaximized::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -103,7 +103,7 @@ void TestMaximized::cleanup() void TestMaximized::testMaximizedPassedToDeco() { - // this test verifies that when a ShellClient gets maximized the Decoration receives the signal + // this test verifies that when a XdgShellClient gets maximized the Decoration receives the signal // Create the test client. QScopedPointer surface(Test::createSurface()); @@ -202,7 +202,7 @@ void TestMaximized::testInitiallyMaximized() // Now let's render in an incorrect size. shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QCOMPARE(client->geometry(), QRect(0, 0, 100, 50)); QEXPECT_FAIL("", "Should go out of maximzied", Continue); @@ -249,7 +249,7 @@ void TestMaximized::testBorderlessMaximizedWindow() // Map the client. shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QCOMPARE(client->maximizeMode(), MaximizeMode::MaximizeRestore); @@ -326,7 +326,7 @@ void TestMaximized::testBorderlessMaximizedWindowNoClientSideDecoration() auto client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); - QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); QSignalSpy sizeChangeRequestedSpy(xdgShellSurface.data(), &XdgShellSurface::sizeChanged); QVERIFY(sizeChangeRequestedSpy.isValid()); diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index 4ff41aed68..87dfc93e5a 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -28,7 +28,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "deleted.h" #include @@ -94,7 +94,7 @@ void MoveResizeWindowTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType("MaximizeMode"); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -321,7 +321,7 @@ void MoveResizeWindowTest::testResize() QCOMPARE(moveResizedChangedSpy.count(), 2); QCOMPARE(c->isResize(), false); QCOMPARE(workspace()->moveResizeClient(), nullptr); - QEXPECT_FAIL("", "ShellClient currently doesn't send final configure event", Abort); + QEXPECT_FAIL("", "XdgShellClient currently doesn't send final configure event", Abort); QVERIFY(configureRequestedSpy.wait()); QCOMPARE(configureRequestedSpy.count(), 6); states = configureRequestedSpy.last().at(1).value(); @@ -816,7 +816,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingX11Panel() QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint); // and close - QSignalSpy windowClosedSpy(testWindow, &ShellClient::windowClosed); + QSignalSpy windowClosedSpy(testWindow, &XdgShellClient::windowClosed); QVERIFY(windowClosedSpy.isValid()); shellSurface.reset(); surface.reset(); @@ -882,7 +882,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel() QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint); // and destroy the panel again - QSignalSpy panelClosedSpy(panel, &ShellClient::windowClosed); + QSignalSpy panelClosedSpy(panel, &XdgShellClient::windowClosed); QVERIFY(panelClosedSpy.isValid()); plasmaSurface.reset(); panelShellSurface.reset(); @@ -893,7 +893,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel() QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint); // and close - QSignalSpy windowClosedSpy(testWindow, &ShellClient::windowClosed); + QSignalSpy windowClosedSpy(testWindow, &XdgShellClient::windowClosed); QVERIFY(windowClosedSpy.isValid()); shellSurface.reset(); surface.reset(); @@ -920,7 +920,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboard() QVERIFY(configureRequestedSpy.wait()); client->move(100, 300); - QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); QCOMPARE(client->geometry(), QRect(100, 300, 500, 800)); @@ -963,7 +963,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithMaximize() QVERIFY(configureRequestedSpy.wait()); client->move(100, 300); - QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); QCOMPARE(client->geometry(), QRect(100, 300, 500, 800)); @@ -1014,7 +1014,7 @@ void MoveResizeWindowTest::testResizeForVirtualKeyboardWithFullScreen() QVERIFY(configureRequestedSpy.wait()); client->move(100, 300); - QSignalSpy geometryChangedSpy(client, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(client, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); QCOMPARE(client->geometry(), QRect(100, 300, 500, 800)); @@ -1055,7 +1055,7 @@ void MoveResizeWindowTest::testDestroyMoveClient() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); // Start moving the client. @@ -1092,7 +1092,7 @@ void MoveResizeWindowTest::testDestroyResizeClient() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); // Start resizing the client. @@ -1129,7 +1129,7 @@ void MoveResizeWindowTest::testUnmapMoveClient() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); // Start resizing the client. @@ -1148,7 +1148,7 @@ void MoveResizeWindowTest::testUnmapMoveClient() QCOMPARE(client->isResize(), false); // Unmap the client while we're moving it. - QSignalSpy hiddenSpy(client, &ShellClient::windowHidden); + QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden); QVERIFY(hiddenSpy.isValid()); surface->attachBuffer(Buffer::Ptr()); surface->commit(Surface::CommitFlag::None); @@ -1175,7 +1175,7 @@ void MoveResizeWindowTest::testUnmapResizeClient() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); // Start resizing the client. @@ -1194,7 +1194,7 @@ void MoveResizeWindowTest::testUnmapResizeClient() QCOMPARE(client->isResize(), true); // Unmap the client while we're resizing it. - QSignalSpy hiddenSpy(client, &ShellClient::windowHidden); + QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden); QVERIFY(hiddenSpy.isValid()); surface->attachBuffer(Buffer::Ptr()); surface->commit(Surface::CommitFlag::None); diff --git a/autotests/integration/placement_test.cpp b/autotests/integration/placement_test.cpp index a116b8477b..a7f9dbfc76 100644 --- a/autotests/integration/placement_test.cpp +++ b/autotests/integration/placement_test.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "kwin_wayland_test.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -89,7 +89,7 @@ void TestPlacement::cleanup() void TestPlacement::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -215,7 +215,7 @@ void TestPlacement::testPlaceCentered() QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red); QVERIFY(client); QCOMPARE(client->geometry(), QRect(590, 487, 100, 50)); @@ -237,7 +237,7 @@ void TestPlacement::testPlaceUnderMouse() QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::red); QVERIFY(client); QCOMPARE(client->geometry(), QRect(151, 276, 100, 50)); @@ -256,21 +256,21 @@ void TestPlacement::testPlaceCascaded() QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red); QVERIFY(client1); QCOMPARE(client1->pos(), QPoint(0, 0)); QCOMPARE(client1->size(), QSize(100, 50)); QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QCOMPARE(client2->pos(), client1->pos() + workspace()->cascadeOffset(client2)); QCOMPARE(client2->size(), QSize(100, 50)); QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green); QVERIFY(client3); QCOMPARE(client3->pos(), client2->pos() + workspace()->cascadeOffset(client3)); QCOMPARE(client3->size(), QSize(100, 50)); @@ -294,20 +294,20 @@ void TestPlacement::testPlaceRandom() QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createXdgShellStableSurface(surface1.data())); - ShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red); + XdgShellClient *client1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::red); QVERIFY(client1); QCOMPARE(client1->size(), QSize(100, 50)); QScopedPointer surface2(Test::createSurface()); QScopedPointer shellSurface2(Test::createXdgShellStableSurface(surface2.data())); - ShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::blue); QVERIFY(client2); QVERIFY(client2->pos() != client1->pos()); QCOMPARE(client2->size(), QSize(100, 50)); QScopedPointer surface3(Test::createSurface()); QScopedPointer shellSurface3(Test::createXdgShellStableSurface(surface3.data())); - ShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green); + XdgShellClient *client3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::green); QVERIFY(client3); QVERIFY(client3->pos() != client1->pos()); QVERIFY(client3->pos() != client2->pos()); diff --git a/autotests/integration/plasma_surface_test.cpp b/autotests/integration/plasma_surface_test.cpp index 0e3d8ad77c..1edceb0d0c 100644 --- a/autotests/integration/plasma_surface_test.cpp +++ b/autotests/integration/plasma_surface_test.cpp @@ -20,7 +20,7 @@ along with this program. If not, see . #include "kwin_wayland_test.h" #include "platform.h" #include "cursor.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -71,7 +71,7 @@ private: void PlasmaSurfaceTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -110,7 +110,7 @@ void PlasmaSurfaceTest::testRoleOnAllDesktops_data() void PlasmaSurfaceTest::testRoleOnAllDesktops() { - // this test verifies that a ShellClient is set on all desktops when the role changes + // this test verifies that a XdgShellClient is set on all desktops when the role changes QScopedPointer surface(Test::createSurface()); QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); diff --git a/autotests/integration/plasmawindow_test.cpp b/autotests/integration/plasmawindow_test.cpp index 7999e6c84b..a9bee087d2 100644 --- a/autotests/integration/plasmawindow_test.cpp +++ b/autotests/integration/plasmawindow_test.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -68,7 +68,7 @@ private: void PlasmaWindowTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -245,7 +245,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow() // first create the parent window QScopedPointer parentSurface(Test::createSurface()); QScopedPointer parentShellSurface(Test::createXdgShellStableSurface(parentSurface.data())); - ShellClient *parentClient = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *parentClient = Test::renderAndWaitForShown(parentSurface.data(), QSize(100, 50), Qt::blue); QVERIFY(parentClient); QVERIFY(plasmaWindowCreatedSpy.wait()); QCOMPARE(plasmaWindowCreatedSpy.count(), 1); @@ -256,7 +256,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow() positioner.setGravity(Qt::BottomEdge | Qt::RightEdge); QScopedPointer popupSurface(Test::createSurface()); QScopedPointer popupShellSurface(Test::createXdgShellStablePopup(popupSurface.data(), parentShellSurface.data(), positioner)); - ShellClient *popupClient = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::blue); + XdgShellClient *popupClient = Test::renderAndWaitForShown(popupSurface.data(), positioner.initialSize(), Qt::blue); QVERIFY(popupClient); QVERIFY(!plasmaWindowCreatedSpy.wait(100)); QCOMPARE(plasmaWindowCreatedSpy.count(), 1); @@ -274,13 +274,13 @@ void PlasmaWindowTest::testLockScreenNoPlasmaWindow() QSignalSpy plasmaWindowCreatedSpy(m_windowManagement, &PlasmaWindowManagement::windowCreated); QVERIFY(plasmaWindowCreatedSpy.isValid()); - // this time we use a QSignalSpy on ShellClient as it'a a little bit more complex setup + // this time we use a QSignalSpy on XdgShellClient as it'a a little bit more complex setup QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); QVERIFY(clientAddedSpy.isValid()); // lock ScreenLocker::KSldApp::self()->lock(ScreenLocker::EstablishLock::Immediate); QVERIFY(clientAddedSpy.wait()); - QVERIFY(clientAddedSpy.first().first().value()->isLockScreen()); + QVERIFY(clientAddedSpy.first().first().value()->isLockScreen()); // should not be sent to the client QVERIFY(plasmaWindowCreatedSpy.isEmpty()); QVERIFY(!plasmaWindowCreatedSpy.wait()); diff --git a/autotests/integration/pointer_constraints_test.cpp b/autotests/integration/pointer_constraints_test.cpp index 802888d2a0..7aea27c543 100644 --- a/autotests/integration/pointer_constraints_test.cpp +++ b/autotests/integration/pointer_constraints_test.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "keyboard_input.h" #include "platform.h" #include "pointer_input.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -69,7 +69,7 @@ private Q_SLOTS: void TestPointerConstraints::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/pointer_input.cpp b/autotests/integration/pointer_input.cpp index 8440d68f36..63ecae739e 100644 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -30,7 +30,7 @@ along with this program. If not, see . #include "wayland_cursor_theme.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -140,7 +140,7 @@ private: void PointerInputTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -1209,7 +1209,7 @@ void PointerInputTest::testPopup() popupShellSurface->requestGrab(Test::waylandSeat(), 0); // FIXME: Serial. render(popupSurface, positioner.initialSize()); QVERIFY(clientAddedSpy.wait()); - auto popupClient = clientAddedSpy.last().first().value(); + auto popupClient = clientAddedSpy.last().first().value(); QVERIFY(popupClient); QVERIFY(popupClient != window); QCOMPARE(window, workspace()->activeClient()); @@ -1300,7 +1300,7 @@ void PointerInputTest::testDecoCancelsPopup() popupShellSurface->requestGrab(Test::waylandSeat(), 0); // FIXME: Serial. render(popupSurface, positioner.initialSize()); QVERIFY(clientAddedSpy.wait()); - auto popupClient = clientAddedSpy.last().first().value(); + auto popupClient = clientAddedSpy.last().first().value(); QVERIFY(popupClient); QVERIFY(popupClient != window); QCOMPARE(window, workspace()->activeClient()); @@ -1362,7 +1362,7 @@ void PointerInputTest::testWindowUnderCursorWhileButtonPressed() QVERIFY(popupShellSurface); render(popupSurface, positioner.initialSize()); QVERIFY(clientAddedSpy.wait()); - auto popupClient = clientAddedSpy.last().first().value(); + auto popupClient = clientAddedSpy.last().first().value(); QVERIFY(popupClient); QVERIFY(popupClient != window); QVERIFY(window->geometry().contains(Cursor::pos())); @@ -1501,7 +1501,7 @@ void PointerInputTest::testResizeCursor() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(c); // move the cursor to the test position @@ -1571,7 +1571,7 @@ void PointerInputTest::testMoveCursor() QVERIFY(!surface.isNull()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); QVERIFY(!shellSurface.isNull()); - ShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(c); // move cursor to the test position diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index 928f71948e..aca43f5fef 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "scripting/scripting.h" #include @@ -92,7 +92,7 @@ private: void QuickTilingTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType("MaximizeMode"); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/scene_opengl_shadow_test.cpp b/autotests/integration/scene_opengl_shadow_test.cpp index cf367dbe85..f208e22294 100644 --- a/autotests/integration/scene_opengl_shadow_test.cpp +++ b/autotests/integration/scene_opengl_shadow_test.cpp @@ -44,7 +44,7 @@ along with this program. If not, see . #include "effects.h" #include "platform.h" #include "shadow.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -112,7 +112,7 @@ void SceneOpenGLShadowTest::initTestCase() { // Copied from generic_scene_opengl_test.cpp - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/scene_qpainter_shadow_test.cpp b/autotests/integration/scene_qpainter_shadow_test.cpp index ae853feca3..eb9a343ed4 100644 --- a/autotests/integration/scene_qpainter_shadow_test.cpp +++ b/autotests/integration/scene_qpainter_shadow_test.cpp @@ -49,7 +49,7 @@ along with this program. If not, see . #include "platform.h" #include "plugins/scenes/qpainter/scene_qpainter.h" #include "shadow.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -116,7 +116,7 @@ void SceneQPainterShadowTest::initTestCase() { // Copied from scene_qpainter_test.cpp - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/scene_qpainter_test.cpp b/autotests/integration/scene_qpainter_test.cpp index 52bf2325e9..76c0aae8c9 100644 --- a/autotests/integration/scene_qpainter_test.cpp +++ b/autotests/integration/scene_qpainter_test.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "cursor.h" #include "effects.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "effect_builtins.h" #include "workspace.h" @@ -68,7 +68,7 @@ void SceneQPainterTest::cleanup() void SceneQPainterTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/screenedge_client_show_test.cpp b/autotests/integration/screenedge_client_show_test.cpp index ccb7674ab7..64f2641d1a 100644 --- a/autotests/integration/screenedge_client_show_test.cpp +++ b/autotests/integration/screenedge_client_show_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -51,7 +51,7 @@ private Q_SLOTS: void ScreenEdgeClientShowTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/shade_test.cpp b/autotests/integration/shade_test.cpp index 9e9330041c..b70d886ade 100644 --- a/autotests/integration/shade_test.cpp +++ b/autotests/integration/shade_test.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -49,7 +49,7 @@ private Q_SLOTS: void ShadeTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/showing_desktop_test.cpp b/autotests/integration/showing_desktop_test.cpp index 978ee13a5d..20f505f44c 100644 --- a/autotests/integration/showing_desktop_test.cpp +++ b/autotests/integration/showing_desktop_test.cpp @@ -19,7 +19,7 @@ along with this program. If not, see . *********************************************************************/ #include "kwin_wayland_test.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -45,7 +45,7 @@ private Q_SLOTS: void ShowingDesktopTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/stacking_order_test.cpp b/autotests/integration/stacking_order_test.cpp index 2d0b8580f7..12a1501bfe 100644 --- a/autotests/integration/stacking_order_test.cpp +++ b/autotests/integration/stacking_order_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "deleted.h" #include "main.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -67,7 +67,7 @@ void StackingOrderTest::initTestCase() { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -102,7 +102,7 @@ void StackingOrderTest::testTransientIsAboveParent() KWayland::Client::XdgShellSurface *parentShellSurface = Test::createXdgShellStableSurface(parentSurface, parentSurface); QVERIFY(parentShellSurface); - ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); + XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); QVERIFY(parent); QVERIFY(parent->isActive()); QVERIFY(!parent->isTransient()); @@ -118,7 +118,7 @@ void StackingOrderTest::testTransientIsAboveParent() Test::createXdgShellStableSurface(transientSurface, transientSurface); QVERIFY(transientShellSurface); transientShellSurface->setTransientFor(parentShellSurface); - ShellClient *transient = Test::renderAndWaitForShown( + XdgShellClient *transient = Test::renderAndWaitForShown( transientSurface, QSize(128, 128), Qt::red); QVERIFY(transient); QVERIFY(transient->isActive()); @@ -146,7 +146,7 @@ void StackingOrderTest::testRaiseTransient() KWayland::Client::XdgShellSurface *parentShellSurface = Test::createXdgShellStableSurface(parentSurface, parentSurface); QVERIFY(parentShellSurface); - ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); + XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); QVERIFY(parent); QVERIFY(parent->isActive()); QVERIFY(!parent->isTransient()); @@ -162,7 +162,7 @@ void StackingOrderTest::testRaiseTransient() Test::createXdgShellStableSurface(transientSurface, transientSurface); QVERIFY(transientShellSurface); transientShellSurface->setTransientFor(parentShellSurface); - ShellClient *transient = Test::renderAndWaitForShown( + XdgShellClient *transient = Test::renderAndWaitForShown( transientSurface, QSize(128, 128), Qt::red); QVERIFY(transient); QTRY_VERIFY(transient->isActive()); @@ -178,7 +178,7 @@ void StackingOrderTest::testRaiseTransient() KWayland::Client::XdgShellSurface *anotherShellSurface = Test::createXdgShellStableSurface(anotherSurface, anotherSurface); QVERIFY(anotherShellSurface); - ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); + XdgShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); QVERIFY(anotherClient); QVERIFY(anotherClient->isActive()); QVERIFY(!anotherClient->isTransient()); @@ -229,7 +229,7 @@ void StackingOrderTest::testDeletedTransient() KWayland::Client::XdgShellSurface *parentShellSurface = Test::createXdgShellStableSurface(parentSurface, parentSurface); QVERIFY(parentShellSurface); - ShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); + XdgShellClient *parent = Test::renderAndWaitForShown(parentSurface, QSize(256, 256), Qt::blue); QVERIFY(parent); QVERIFY(parent->isActive()); QVERIFY(!parent->isTransient()); @@ -244,7 +244,7 @@ void StackingOrderTest::testDeletedTransient() Test::createXdgShellStableSurface(transient1Surface, transient1Surface); QVERIFY(transient1ShellSurface); transient1ShellSurface->setTransientFor(parentShellSurface); - ShellClient *transient1 = Test::renderAndWaitForShown( + XdgShellClient *transient1 = Test::renderAndWaitForShown( transient1Surface, QSize(128, 128), Qt::red); QVERIFY(transient1); QTRY_VERIFY(transient1->isActive()); @@ -261,7 +261,7 @@ void StackingOrderTest::testDeletedTransient() Test::createXdgShellStableSurface(transient2Surface, transient2Surface); QVERIFY(transient2ShellSurface); transient2ShellSurface->setTransientFor(transient1ShellSurface); - ShellClient *transient2 = Test::renderAndWaitForShown( + XdgShellClient *transient2 = Test::renderAndWaitForShown( transient2Surface, QSize(128, 128), Qt::red); QVERIFY(transient2); QTRY_VERIFY(transient2->isActive()); @@ -277,14 +277,14 @@ void StackingOrderTest::testDeletedTransient() QTRY_VERIFY(!transient2->isActive()); // Close the top-most transient. - connect(transient2, &ShellClient::windowClosed, this, + connect(transient2, &XdgShellClient::windowClosed, this, [](Toplevel *toplevel, Deleted *deleted) { Q_UNUSED(toplevel) deleted->refWindow(); } ); - QSignalSpy windowClosedSpy(transient2, &ShellClient::windowClosed); + QSignalSpy windowClosedSpy(transient2, &XdgShellClient::windowClosed); QVERIFY(windowClosedSpy.isValid()); delete transient2ShellSurface; delete transient2Surface; @@ -571,7 +571,7 @@ void StackingOrderTest::testRaiseGroupTransient() KWayland::Client::XdgShellSurface *anotherShellSurface = Test::createXdgShellStableSurface(anotherSurface, anotherSurface); QVERIFY(anotherShellSurface); - ShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); + XdgShellClient *anotherClient = Test::renderAndWaitForShown(anotherSurface, QSize(128, 128), Qt::green); QVERIFY(anotherClient); QVERIFY(anotherClient->isActive()); QVERIFY(!anotherClient->isTransient()); @@ -826,7 +826,7 @@ void StackingOrderTest::testKeepAbove() KWayland::Client::XdgShellSurface *clientAShellSurface = Test::createXdgShellStableSurface(clientASurface, clientASurface); QVERIFY(clientAShellSurface); - ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); + XdgShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); QVERIFY(clientA); QVERIFY(clientA->isActive()); QVERIFY(!clientA->keepAbove()); @@ -840,7 +840,7 @@ void StackingOrderTest::testKeepAbove() KWayland::Client::XdgShellSurface *clientBShellSurface = Test::createXdgShellStableSurface(clientBSurface, clientBSurface); QVERIFY(clientBShellSurface); - ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); + XdgShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); QVERIFY(clientB); QVERIFY(clientB->isActive()); QVERIFY(!clientB->keepAbove()); @@ -874,7 +874,7 @@ void StackingOrderTest::testKeepBelow() KWayland::Client::XdgShellSurface *clientAShellSurface = Test::createXdgShellStableSurface(clientASurface, clientASurface); QVERIFY(clientAShellSurface); - ShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); + XdgShellClient *clientA = Test::renderAndWaitForShown(clientASurface, QSize(128, 128), Qt::green); QVERIFY(clientA); QVERIFY(clientA->isActive()); QVERIFY(!clientA->keepBelow()); @@ -888,7 +888,7 @@ void StackingOrderTest::testKeepBelow() KWayland::Client::XdgShellSurface *clientBShellSurface = Test::createXdgShellStableSurface(clientBSurface, clientBSurface); QVERIFY(clientBShellSurface); - ShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); + XdgShellClient *clientB = Test::renderAndWaitForShown(clientBSurface, QSize(128, 128), Qt::green); QVERIFY(clientB); QVERIFY(clientB->isActive()); QVERIFY(!clientB->keepBelow()); diff --git a/autotests/integration/struts_test.cpp b/autotests/integration/struts_test.cpp index 3071c467ce..943f119b34 100644 --- a/autotests/integration/struts_test.cpp +++ b/autotests/integration/struts_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -67,7 +67,7 @@ private: void StrutsTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -168,7 +168,7 @@ void StrutsTest::testWaylandStruts() QFETCH(QVector, windowGeometries); // create the panels - QHash clients; + QHash clients; for (auto it = windowGeometries.constBegin(), end = windowGeometries.constEnd(); it != end; it++) { const QRect windowGeometry = *it; Surface *surface = Test::createSurface(m_compositor); @@ -246,7 +246,7 @@ void StrutsTest::testMoveWaylandPanel() QCOMPARE(workspace()->clientArea(MaximizeArea, 1, 1), QRect(1280, 0, 1280, 1024)); QCOMPARE(workspace()->clientArea(WorkArea, 0, 1), QRect(0, 0, 2560, 1000)); - QSignalSpy geometryChangedSpy(c, &ShellClient::geometryShapeChanged); + QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryShapeChanged); QVERIFY(geometryChangedSpy.isValid()); plasmaSurface->setPosition(QPoint(1280, 1000)); QVERIFY(geometryChangedSpy.wait()); diff --git a/autotests/integration/tabbox_test.cpp b/autotests/integration/tabbox_test.cpp index 1407f017db..a7db23eb3c 100644 --- a/autotests/integration/tabbox_test.cpp +++ b/autotests/integration/tabbox_test.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "input.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "tabbox/tabbox.h" #include "wayland_server.h" #include "workspace.h" @@ -52,7 +52,7 @@ private Q_SLOTS: void TabBoxTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index 88d514fde2..f403daafb1 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ #include "kwin_wayland_test.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screenlockerwatcher.h" #include "wayland_server.h" @@ -392,7 +392,7 @@ void render(Surface *surface, const QImage &img) surface->commit(Surface::CommitFlag::None); } -ShellClient *waitForWaylandWindowShown(int timeout) +XdgShellClient *waitForWaylandWindowShown(int timeout) { QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); if (!clientAddedSpy.isValid()) { @@ -401,10 +401,10 @@ ShellClient *waitForWaylandWindowShown(int timeout) if (!clientAddedSpy.wait(timeout)) { return nullptr; } - return clientAddedSpy.first().first().value(); + return clientAddedSpy.first().first().value(); } -ShellClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format, int timeout) +XdgShellClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QColor &color, const QImage::Format &format, int timeout) { QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); if (!clientAddedSpy.isValid()) { @@ -415,7 +415,7 @@ ShellClient *renderAndWaitForShown(Surface *surface, const QSize &size, const QC if (!clientAddedSpy.wait(timeout)) { return nullptr; } - return clientAddedSpy.first().first().value(); + return clientAddedSpy.first().first().value(); } void flushWaylandConnection() diff --git a/autotests/integration/touch_input_test.cpp b/autotests/integration/touch_input_test.cpp index 58bf3d7482..cbf743553b 100644 --- a/autotests/integration/touch_input_test.cpp +++ b/autotests/integration/touch_input_test.cpp @@ -20,7 +20,7 @@ along with this program. If not, see . #include "kwin_wayland_test.h" #include "platform.h" #include "cursor.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -57,7 +57,7 @@ private: void TouchInputTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/transient_placement.cpp b/autotests/integration/transient_placement.cpp index 6b7dd5a6fc..b4b97ce437 100644 --- a/autotests/integration/transient_placement.cpp +++ b/autotests/integration/transient_placement.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -63,7 +63,7 @@ private Q_SLOTS: void TransientPlacementTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -319,7 +319,7 @@ void TransientPlacementTest::testXdgPopupWithPanel() parent->setFullScreen(true); QVERIFY(fullscreenSpy.wait()); parentShellSurface->ackConfigure(fullscreenSpy.first().at(2).value()); - QSignalSpy geometryShapeChangedSpy{parent, &ShellClient::geometryShapeChanged}; + QSignalSpy geometryShapeChangedSpy{parent, &XdgShellClient::geometryShapeChanged}; QVERIFY(geometryShapeChangedSpy.isValid()); Test::render(parentSurface, fullscreenSpy.first().at(0).toSize(), Qt::red); QVERIFY(geometryShapeChangedSpy.wait()); diff --git a/autotests/integration/virtual_desktop_test.cpp b/autotests/integration/virtual_desktop_test.cpp index 63cc4d96aa..dcaa89e8bc 100644 --- a/autotests/integration/virtual_desktop_test.cpp +++ b/autotests/integration/virtual_desktop_test.cpp @@ -21,7 +21,7 @@ along with this program. If not, see . #include "main.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "virtualdesktops.h" @@ -51,7 +51,7 @@ private Q_SLOTS: void VirtualDesktopTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -157,7 +157,7 @@ void VirtualDesktopTest::testLastDesktopRemoved() QVERIFY(client); QCOMPARE(client->desktop(), 2); - QSignalSpy desktopPresenceChangedSpy(client, &ShellClient::desktopPresenceChanged); + QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged); QVERIFY(desktopPresenceChangedSpy.isValid()); QCOMPARE(client->desktops().count(), 1u); @@ -201,7 +201,7 @@ void VirtualDesktopTest::testWindowOnMultipleDesktops() QVERIFY(client); QCOMPARE(client->desktop(), 3u); - QSignalSpy desktopPresenceChangedSpy(client, &ShellClient::desktopPresenceChanged); + QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged); QVERIFY(desktopPresenceChangedSpy.isValid()); QCOMPARE(client->desktops().count(), 1u); @@ -289,7 +289,7 @@ void VirtualDesktopTest::testRemoveDesktopWithWindow() QVERIFY(client); QCOMPARE(client->desktop(), 3u); - QSignalSpy desktopPresenceChangedSpy(client, &ShellClient::desktopPresenceChanged); + QSignalSpy desktopPresenceChangedSpy(client, &XdgShellClient::desktopPresenceChanged); QVERIFY(desktopPresenceChangedSpy.isValid()); QCOMPARE(client->desktops().count(), 1u); diff --git a/autotests/integration/window_rules_test.cpp b/autotests/integration/window_rules_test.cpp index a73c45cd87..59fde8ef57 100644 --- a/autotests/integration/window_rules_test.cpp +++ b/autotests/integration/window_rules_test.cpp @@ -28,7 +28,7 @@ along with this program. If not, see . #include "rules.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -52,7 +52,7 @@ private Q_SLOTS: void WindowRuleTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/window_selection_test.cpp b/autotests/integration/window_selection_test.cpp index e8ed040a64..a17173f151 100644 --- a/autotests/integration/window_selection_test.cpp +++ b/autotests/integration/window_selection_test.cpp @@ -22,7 +22,7 @@ along with this program. If not, see . #include "keyboard_input.h" #include "platform.h" #include "pointer_input.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -63,7 +63,7 @@ private Q_SLOTS: void TestWindowSelection::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp index edf15e3ebb..ae5ebe52a4 100644 --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "deleted.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "workspace.h" @@ -62,7 +62,7 @@ private Q_SLOTS: void X11ClientTest::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); diff --git a/autotests/integration/shell_client_rules_test.cpp b/autotests/integration/xdgshellclient_rules_test.cpp similarity index 95% rename from autotests/integration/shell_client_rules_test.cpp rename to autotests/integration/xdgshellclient_rules_test.cpp index 72f12f762c..71bfeac9bc 100644 --- a/autotests/integration/shell_client_rules_test.cpp +++ b/autotests/integration/xdgshellclient_rules_test.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "platform.h" #include "rules.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "virtualdesktops.h" #include "wayland_server.h" #include "workspace.h" @@ -38,9 +38,9 @@ along with this program. If not, see . using namespace KWin; using namespace KWayland::Client; -static const QString s_socketName = QStringLiteral("wayland_test_kwin_shell_client_rules-0"); +static const QString s_socketName = QStringLiteral("wayland_test_kwin_xdgshellclient_rules-0"); -class TestShellClientRules : public QObject +class TestXdgShellClientRules : public QObject { Q_OBJECT @@ -222,9 +222,9 @@ private Q_SLOTS: void testMatchAfterNameChange(); }; -void TestShellClientRules::initTestCase() +void TestXdgShellClientRules::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -241,7 +241,7 @@ void TestShellClientRules::initTestCase() waylandServer()->initWorkspace(); } -void TestShellClientRules::init() +void TestXdgShellClientRules::init() { VirtualDesktopManager::self()->setCurrent(VirtualDesktopManager::self()->desktops().first()); QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); @@ -249,7 +249,7 @@ void TestShellClientRules::init() screens()->setCurrent(0); } -void TestShellClientRules::cleanup() +void TestXdgShellClientRules::cleanup() { Test::destroyWaylandConnection(); @@ -263,14 +263,14 @@ void TestShellClientRules::cleanup() } #define TEST_DATA(name) \ -void TestShellClientRules::name##_data() \ +void TestXdgShellClientRules::name##_data() \ { \ QTest::addColumn("type"); \ QTest::newRow("XdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; \ QTest::newRow("XdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; \ } -std::tuple createWindow(Test::XdgShellSurfaceType type, const QByteArray &appId) +std::tuple createWindow(Test::XdgShellSurfaceType type, const QByteArray &appId) { // Create an xdg surface. Surface *surface = Test::createSurface(); @@ -286,14 +286,14 @@ std::tuple createWindow(Test::XdgSh // Draw content of the surface. shellSurface->ackConfigure(configureRequestedSpy.last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface, QSize(100, 50), Qt::blue); return {client, surface, shellSurface}; } TEST_DATA(testPositionDontAffect) -void TestShellClientRules::testPositionDontAffect() +void TestXdgShellClientRules::testPositionDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -310,7 +310,7 @@ void TestShellClientRules::testPositionDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -331,7 +331,7 @@ void TestShellClientRules::testPositionDontAffect() TEST_DATA(testPositionApply) -void TestShellClientRules::testPositionApply() +void TestXdgShellClientRules::testPositionApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -348,7 +348,7 @@ void TestShellClientRules::testPositionApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -410,7 +410,7 @@ void TestShellClientRules::testPositionApply() TEST_DATA(testPositionRemember) -void TestShellClientRules::testPositionRemember() +void TestXdgShellClientRules::testPositionRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -427,7 +427,7 @@ void TestShellClientRules::testPositionRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -489,7 +489,7 @@ void TestShellClientRules::testPositionRemember() TEST_DATA(testPositionForce) -void TestShellClientRules::testPositionForce() +void TestXdgShellClientRules::testPositionForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -506,7 +506,7 @@ void TestShellClientRules::testPositionForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -549,11 +549,11 @@ void TestShellClientRules::testPositionForce() TEST_DATA(testPositionApplyNow) -void TestShellClientRules::testPositionApplyNow() +void TestXdgShellClientRules::testPositionApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; QObject *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -630,7 +630,7 @@ void TestShellClientRules::testPositionApplyNow() TEST_DATA(testPositionForceTemporarily) -void TestShellClientRules::testPositionForceTemporarily() +void TestXdgShellClientRules::testPositionForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -647,7 +647,7 @@ void TestShellClientRules::testPositionForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -690,7 +690,7 @@ void TestShellClientRules::testPositionForceTemporarily() TEST_DATA(testSizeDontAffect) -void TestShellClientRules::testSizeDontAffect() +void TestXdgShellClientRules::testSizeDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -723,7 +723,7 @@ void TestShellClientRules::testSizeDontAffect() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isResizable()); @@ -741,7 +741,7 @@ void TestShellClientRules::testSizeDontAffect() TEST_DATA(testSizeApply) -void TestShellClientRules::testSizeApply() +void TestXdgShellClientRules::testSizeApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -778,7 +778,7 @@ void TestShellClientRules::testSizeApply() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isResizable()); @@ -879,7 +879,7 @@ void TestShellClientRules::testSizeApply() TEST_DATA(testSizeRemember) -void TestShellClientRules::testSizeRemember() +void TestXdgShellClientRules::testSizeRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -916,7 +916,7 @@ void TestShellClientRules::testSizeRemember() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isResizable()); @@ -1017,7 +1017,7 @@ void TestShellClientRules::testSizeRemember() TEST_DATA(testSizeForce) -void TestShellClientRules::testSizeForce() +void TestXdgShellClientRules::testSizeForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1050,7 +1050,7 @@ void TestShellClientRules::testSizeForce() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(!client->isResizable()); @@ -1105,7 +1105,7 @@ void TestShellClientRules::testSizeForce() TEST_DATA(testSizeApplyNow) -void TestShellClientRules::testSizeApplyNow() +void TestXdgShellClientRules::testSizeApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); @@ -1125,7 +1125,7 @@ void TestShellClientRules::testSizeApplyNow() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isResizable()); @@ -1174,7 +1174,7 @@ void TestShellClientRules::testSizeApplyNow() TEST_DATA(testSizeForceTemporarily) -void TestShellClientRules::testSizeForceTemporarily() +void TestXdgShellClientRules::testSizeForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1207,7 +1207,7 @@ void TestShellClientRules::testSizeForceTemporarily() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(480, 640), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(!client->isResizable()); @@ -1262,7 +1262,7 @@ void TestShellClientRules::testSizeForceTemporarily() TEST_DATA(testMaximizeDontAffect) -void TestShellClientRules::testMaximizeDontAffect() +void TestXdgShellClientRules::testMaximizeDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1301,7 +1301,7 @@ void TestShellClientRules::testMaximizeDontAffect() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isMaximizable()); @@ -1324,7 +1324,7 @@ void TestShellClientRules::testMaximizeDontAffect() TEST_DATA(testMaximizeApply) -void TestShellClientRules::testMaximizeApply() +void TestXdgShellClientRules::testMaximizeApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1363,7 +1363,7 @@ void TestShellClientRules::testMaximizeApply() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isMaximizable()); @@ -1436,7 +1436,7 @@ void TestShellClientRules::testMaximizeApply() TEST_DATA(testMaximizeRemember) -void TestShellClientRules::testMaximizeRemember() +void TestXdgShellClientRules::testMaximizeRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1475,7 +1475,7 @@ void TestShellClientRules::testMaximizeRemember() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isMaximizable()); @@ -1548,7 +1548,7 @@ void TestShellClientRules::testMaximizeRemember() TEST_DATA(testMaximizeForce) -void TestShellClientRules::testMaximizeForce() +void TestXdgShellClientRules::testMaximizeForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1587,7 +1587,7 @@ void TestShellClientRules::testMaximizeForce() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(!client->isMaximizable()); @@ -1650,7 +1650,7 @@ void TestShellClientRules::testMaximizeForce() TEST_DATA(testMaximizeApplyNow) -void TestShellClientRules::testMaximizeApplyNow() +void TestXdgShellClientRules::testMaximizeApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); @@ -1674,7 +1674,7 @@ void TestShellClientRules::testMaximizeApplyNow() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(client->isMaximizable()); @@ -1757,7 +1757,7 @@ void TestShellClientRules::testMaximizeApplyNow() TEST_DATA(testMaximizeForceTemporarily) -void TestShellClientRules::testMaximizeForceTemporarily() +void TestXdgShellClientRules::testMaximizeForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1796,7 +1796,7 @@ void TestShellClientRules::testMaximizeForceTemporarily() // Map the client. shellSurface->ackConfigure(configureRequestedSpy->last().at(2).value()); - ShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); + XdgShellClient *client = Test::renderAndWaitForShown(surface.data(), QSize(1280, 1024), Qt::blue); QVERIFY(client); QVERIFY(client->isActive()); QVERIFY(!client->isMaximizable()); @@ -1859,7 +1859,7 @@ void TestShellClientRules::testMaximizeForceTemporarily() TEST_DATA(testDesktopDontAffect) -void TestShellClientRules::testDesktopDontAffect() +void TestXdgShellClientRules::testDesktopDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1882,7 +1882,7 @@ void TestShellClientRules::testDesktopDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -1900,7 +1900,7 @@ void TestShellClientRules::testDesktopDontAffect() TEST_DATA(testDesktopApply) -void TestShellClientRules::testDesktopApply() +void TestXdgShellClientRules::testDesktopApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1923,7 +1923,7 @@ void TestShellClientRules::testDesktopApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -1957,7 +1957,7 @@ void TestShellClientRules::testDesktopApply() TEST_DATA(testDesktopRemember) -void TestShellClientRules::testDesktopRemember() +void TestXdgShellClientRules::testDesktopRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -1980,7 +1980,7 @@ void TestShellClientRules::testDesktopRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2010,7 +2010,7 @@ void TestShellClientRules::testDesktopRemember() TEST_DATA(testDesktopForce) -void TestShellClientRules::testDesktopForce() +void TestXdgShellClientRules::testDesktopForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2033,7 +2033,7 @@ void TestShellClientRules::testDesktopForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2067,7 +2067,7 @@ void TestShellClientRules::testDesktopForce() TEST_DATA(testDesktopApplyNow) -void TestShellClientRules::testDesktopApplyNow() +void TestXdgShellClientRules::testDesktopApplyNow() { // We need at least two virtual desktop for this test. VirtualDesktopManager::self()->setCount(2); @@ -2077,7 +2077,7 @@ void TestShellClientRules::testDesktopApplyNow() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2120,7 +2120,7 @@ void TestShellClientRules::testDesktopApplyNow() TEST_DATA(testDesktopForceTemporarily) -void TestShellClientRules::testDesktopForceTemporarily() +void TestXdgShellClientRules::testDesktopForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2143,7 +2143,7 @@ void TestShellClientRules::testDesktopForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2185,7 +2185,7 @@ void TestShellClientRules::testDesktopForceTemporarily() TEST_DATA(testMinimizeDontAffect) -void TestShellClientRules::testMinimizeDontAffect() +void TestXdgShellClientRules::testMinimizeDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2202,7 +2202,7 @@ void TestShellClientRules::testMinimizeDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2220,7 +2220,7 @@ void TestShellClientRules::testMinimizeDontAffect() TEST_DATA(testMinimizeApply) -void TestShellClientRules::testMinimizeApply() +void TestXdgShellClientRules::testMinimizeApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2237,7 +2237,7 @@ void TestShellClientRules::testMinimizeApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2268,7 +2268,7 @@ void TestShellClientRules::testMinimizeApply() TEST_DATA(testMinimizeRemember) -void TestShellClientRules::testMinimizeRemember() +void TestXdgShellClientRules::testMinimizeRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2285,7 +2285,7 @@ void TestShellClientRules::testMinimizeRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2314,7 +2314,7 @@ void TestShellClientRules::testMinimizeRemember() TEST_DATA(testMinimizeForce) -void TestShellClientRules::testMinimizeForce() +void TestXdgShellClientRules::testMinimizeForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2331,7 +2331,7 @@ void TestShellClientRules::testMinimizeForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2362,11 +2362,11 @@ void TestShellClientRules::testMinimizeForce() TEST_DATA(testMinimizeApplyNow) -void TestShellClientRules::testMinimizeApplyNow() +void TestXdgShellClientRules::testMinimizeApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2408,7 +2408,7 @@ void TestShellClientRules::testMinimizeApplyNow() TEST_DATA(testMinimizeForceTemporarily) -void TestShellClientRules::testMinimizeForceTemporarily() +void TestXdgShellClientRules::testMinimizeForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2425,7 +2425,7 @@ void TestShellClientRules::testMinimizeForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2456,7 +2456,7 @@ void TestShellClientRules::testMinimizeForceTemporarily() TEST_DATA(testSkipTaskbarDontAffect) -void TestShellClientRules::testSkipTaskbarDontAffect() +void TestXdgShellClientRules::testSkipTaskbarDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2473,7 +2473,7 @@ void TestShellClientRules::testSkipTaskbarDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2490,7 +2490,7 @@ void TestShellClientRules::testSkipTaskbarDontAffect() TEST_DATA(testSkipTaskbarApply) -void TestShellClientRules::testSkipTaskbarApply() +void TestXdgShellClientRules::testSkipTaskbarApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2507,7 +2507,7 @@ void TestShellClientRules::testSkipTaskbarApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2536,7 +2536,7 @@ void TestShellClientRules::testSkipTaskbarApply() TEST_DATA(testSkipTaskbarRemember) -void TestShellClientRules::testSkipTaskbarRemember() +void TestXdgShellClientRules::testSkipTaskbarRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2553,7 +2553,7 @@ void TestShellClientRules::testSkipTaskbarRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2584,7 +2584,7 @@ void TestShellClientRules::testSkipTaskbarRemember() TEST_DATA(testSkipTaskbarForce) -void TestShellClientRules::testSkipTaskbarForce() +void TestXdgShellClientRules::testSkipTaskbarForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2601,7 +2601,7 @@ void TestShellClientRules::testSkipTaskbarForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2632,11 +2632,11 @@ void TestShellClientRules::testSkipTaskbarForce() TEST_DATA(testSkipTaskbarApplyNow) -void TestShellClientRules::testSkipTaskbarApplyNow() +void TestXdgShellClientRules::testSkipTaskbarApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2675,7 +2675,7 @@ void TestShellClientRules::testSkipTaskbarApplyNow() TEST_DATA(testSkipTaskbarForceTemporarily) -void TestShellClientRules::testSkipTaskbarForceTemporarily() +void TestXdgShellClientRules::testSkipTaskbarForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2692,7 +2692,7 @@ void TestShellClientRules::testSkipTaskbarForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2725,7 +2725,7 @@ void TestShellClientRules::testSkipTaskbarForceTemporarily() TEST_DATA(testSkipPagerDontAffect) -void TestShellClientRules::testSkipPagerDontAffect() +void TestXdgShellClientRules::testSkipPagerDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2742,7 +2742,7 @@ void TestShellClientRules::testSkipPagerDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2759,7 +2759,7 @@ void TestShellClientRules::testSkipPagerDontAffect() TEST_DATA(testSkipPagerApply) -void TestShellClientRules::testSkipPagerApply() +void TestXdgShellClientRules::testSkipPagerApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2776,7 +2776,7 @@ void TestShellClientRules::testSkipPagerApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2805,7 +2805,7 @@ void TestShellClientRules::testSkipPagerApply() TEST_DATA(testSkipPagerRemember) -void TestShellClientRules::testSkipPagerRemember() +void TestXdgShellClientRules::testSkipPagerRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2822,7 +2822,7 @@ void TestShellClientRules::testSkipPagerRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2853,7 +2853,7 @@ void TestShellClientRules::testSkipPagerRemember() TEST_DATA(testSkipPagerForce) -void TestShellClientRules::testSkipPagerForce() +void TestXdgShellClientRules::testSkipPagerForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2870,7 +2870,7 @@ void TestShellClientRules::testSkipPagerForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2901,11 +2901,11 @@ void TestShellClientRules::testSkipPagerForce() TEST_DATA(testSkipPagerApplyNow) -void TestShellClientRules::testSkipPagerApplyNow() +void TestXdgShellClientRules::testSkipPagerApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2944,7 +2944,7 @@ void TestShellClientRules::testSkipPagerApplyNow() TEST_DATA(testSkipPagerForceTemporarily) -void TestShellClientRules::testSkipPagerForceTemporarily() +void TestXdgShellClientRules::testSkipPagerForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -2961,7 +2961,7 @@ void TestShellClientRules::testSkipPagerForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -2994,7 +2994,7 @@ void TestShellClientRules::testSkipPagerForceTemporarily() TEST_DATA(testSkipSwitcherDontAffect) -void TestShellClientRules::testSkipSwitcherDontAffect() +void TestXdgShellClientRules::testSkipSwitcherDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3011,7 +3011,7 @@ void TestShellClientRules::testSkipSwitcherDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3028,7 +3028,7 @@ void TestShellClientRules::testSkipSwitcherDontAffect() TEST_DATA(testSkipSwitcherApply) -void TestShellClientRules::testSkipSwitcherApply() +void TestXdgShellClientRules::testSkipSwitcherApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3045,7 +3045,7 @@ void TestShellClientRules::testSkipSwitcherApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3074,7 +3074,7 @@ void TestShellClientRules::testSkipSwitcherApply() TEST_DATA(testSkipSwitcherRemember) -void TestShellClientRules::testSkipSwitcherRemember() +void TestXdgShellClientRules::testSkipSwitcherRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3091,7 +3091,7 @@ void TestShellClientRules::testSkipSwitcherRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3122,7 +3122,7 @@ void TestShellClientRules::testSkipSwitcherRemember() TEST_DATA(testSkipSwitcherForce) -void TestShellClientRules::testSkipSwitcherForce() +void TestXdgShellClientRules::testSkipSwitcherForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3139,7 +3139,7 @@ void TestShellClientRules::testSkipSwitcherForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3170,11 +3170,11 @@ void TestShellClientRules::testSkipSwitcherForce() TEST_DATA(testSkipSwitcherApplyNow) -void TestShellClientRules::testSkipSwitcherApplyNow() +void TestXdgShellClientRules::testSkipSwitcherApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3213,7 +3213,7 @@ void TestShellClientRules::testSkipSwitcherApplyNow() TEST_DATA(testSkipSwitcherForceTemporarily) -void TestShellClientRules::testSkipSwitcherForceTemporarily() +void TestXdgShellClientRules::testSkipSwitcherForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3230,7 +3230,7 @@ void TestShellClientRules::testSkipSwitcherForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3263,7 +3263,7 @@ void TestShellClientRules::testSkipSwitcherForceTemporarily() TEST_DATA(testKeepAboveDontAffect) -void TestShellClientRules::testKeepAboveDontAffect() +void TestXdgShellClientRules::testKeepAboveDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3280,7 +3280,7 @@ void TestShellClientRules::testKeepAboveDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3297,7 +3297,7 @@ void TestShellClientRules::testKeepAboveDontAffect() TEST_DATA(testKeepAboveApply) -void TestShellClientRules::testKeepAboveApply() +void TestXdgShellClientRules::testKeepAboveApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3314,7 +3314,7 @@ void TestShellClientRules::testKeepAboveApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3343,7 +3343,7 @@ void TestShellClientRules::testKeepAboveApply() TEST_DATA(testKeepAboveRemember) -void TestShellClientRules::testKeepAboveRemember() +void TestXdgShellClientRules::testKeepAboveRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3360,7 +3360,7 @@ void TestShellClientRules::testKeepAboveRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3389,7 +3389,7 @@ void TestShellClientRules::testKeepAboveRemember() TEST_DATA(testKeepAboveForce) -void TestShellClientRules::testKeepAboveForce() +void TestXdgShellClientRules::testKeepAboveForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3406,7 +3406,7 @@ void TestShellClientRules::testKeepAboveForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3435,11 +3435,11 @@ void TestShellClientRules::testKeepAboveForce() TEST_DATA(testKeepAboveApplyNow) -void TestShellClientRules::testKeepAboveApplyNow() +void TestXdgShellClientRules::testKeepAboveApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3478,7 +3478,7 @@ void TestShellClientRules::testKeepAboveApplyNow() TEST_DATA(testKeepAboveForceTemporarily) -void TestShellClientRules::testKeepAboveForceTemporarily() +void TestXdgShellClientRules::testKeepAboveForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3495,7 +3495,7 @@ void TestShellClientRules::testKeepAboveForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3530,7 +3530,7 @@ void TestShellClientRules::testKeepAboveForceTemporarily() TEST_DATA(testKeepBelowDontAffect) -void TestShellClientRules::testKeepBelowDontAffect() +void TestXdgShellClientRules::testKeepBelowDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3547,7 +3547,7 @@ void TestShellClientRules::testKeepBelowDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3564,7 +3564,7 @@ void TestShellClientRules::testKeepBelowDontAffect() TEST_DATA(testKeepBelowApply) -void TestShellClientRules::testKeepBelowApply() +void TestXdgShellClientRules::testKeepBelowApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3581,7 +3581,7 @@ void TestShellClientRules::testKeepBelowApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3610,7 +3610,7 @@ void TestShellClientRules::testKeepBelowApply() TEST_DATA(testKeepBelowRemember) -void TestShellClientRules::testKeepBelowRemember() +void TestXdgShellClientRules::testKeepBelowRemember() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3627,7 +3627,7 @@ void TestShellClientRules::testKeepBelowRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3656,7 +3656,7 @@ void TestShellClientRules::testKeepBelowRemember() TEST_DATA(testKeepBelowForce) -void TestShellClientRules::testKeepBelowForce() +void TestXdgShellClientRules::testKeepBelowForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3673,7 +3673,7 @@ void TestShellClientRules::testKeepBelowForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3702,11 +3702,11 @@ void TestShellClientRules::testKeepBelowForce() TEST_DATA(testKeepBelowApplyNow) -void TestShellClientRules::testKeepBelowApplyNow() +void TestXdgShellClientRules::testKeepBelowApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3745,7 +3745,7 @@ void TestShellClientRules::testKeepBelowApplyNow() TEST_DATA(testKeepBelowForceTemporarily) -void TestShellClientRules::testKeepBelowForceTemporarily() +void TestXdgShellClientRules::testKeepBelowForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3762,7 +3762,7 @@ void TestShellClientRules::testKeepBelowForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3797,7 +3797,7 @@ void TestShellClientRules::testKeepBelowForceTemporarily() TEST_DATA(testShortcutDontAffect) -void TestShellClientRules::testShortcutDontAffect() +void TestXdgShellClientRules::testShortcutDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3814,7 +3814,7 @@ void TestShellClientRules::testShortcutDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3844,7 +3844,7 @@ void TestShellClientRules::testShortcutDontAffect() TEST_DATA(testShortcutApply) -void TestShellClientRules::testShortcutApply() +void TestXdgShellClientRules::testShortcutApply() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -3861,7 +3861,7 @@ void TestShellClientRules::testShortcutApply() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -3927,7 +3927,7 @@ void TestShellClientRules::testShortcutApply() TEST_DATA(testShortcutRemember) -void TestShellClientRules::testShortcutRemember() +void TestXdgShellClientRules::testShortcutRemember() { QSKIP("KWin core doesn't try to save the last used window shortcut"); @@ -3946,7 +3946,7 @@ void TestShellClientRules::testShortcutRemember() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4000,7 +4000,7 @@ void TestShellClientRules::testShortcutRemember() TEST_DATA(testShortcutForce) -void TestShellClientRules::testShortcutForce() +void TestXdgShellClientRules::testShortcutForce() { QSKIP("KWin core can't release forced window shortcuts"); @@ -4019,7 +4019,7 @@ void TestShellClientRules::testShortcutForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4073,11 +4073,11 @@ void TestShellClientRules::testShortcutForce() TEST_DATA(testShortcutApplyNow) -void TestShellClientRules::testShortcutApplyNow() +void TestXdgShellClientRules::testShortcutApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4139,7 +4139,7 @@ void TestShellClientRules::testShortcutApplyNow() TEST_DATA(testShortcutForceTemporarily) -void TestShellClientRules::testShortcutForceTemporarily() +void TestXdgShellClientRules::testShortcutForceTemporarily() { QSKIP("KWin core can't release forced window shortcuts"); @@ -4158,7 +4158,7 @@ void TestShellClientRules::testShortcutForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4210,7 +4210,7 @@ void TestShellClientRules::testShortcutForceTemporarily() TEST_DATA(testDesktopFileDontAffect) -void TestShellClientRules::testDesktopFileDontAffect() +void TestXdgShellClientRules::testDesktopFileDontAffect() { // Currently, the desktop file name is derived from the app id. If the app id is // changed, then the old rules will be lost. Either setDesktopFileName should @@ -4220,7 +4220,7 @@ void TestShellClientRules::testDesktopFileDontAffect() TEST_DATA(testDesktopFileApply) -void TestShellClientRules::testDesktopFileApply() +void TestXdgShellClientRules::testDesktopFileApply() { // Currently, the desktop file name is derived from the app id. If the app id is // changed, then the old rules will be lost. Either setDesktopFileName should @@ -4230,7 +4230,7 @@ void TestShellClientRules::testDesktopFileApply() TEST_DATA(testDesktopFileRemember) -void TestShellClientRules::testDesktopFileRemember() +void TestXdgShellClientRules::testDesktopFileRemember() { // Currently, the desktop file name is derived from the app id. If the app id is // changed, then the old rules will be lost. Either setDesktopFileName should @@ -4240,7 +4240,7 @@ void TestShellClientRules::testDesktopFileRemember() TEST_DATA(testDesktopFileForce) -void TestShellClientRules::testDesktopFileForce() +void TestXdgShellClientRules::testDesktopFileForce() { // Currently, the desktop file name is derived from the app id. If the app id is // changed, then the old rules will be lost. Either setDesktopFileName should @@ -4250,7 +4250,7 @@ void TestShellClientRules::testDesktopFileForce() TEST_DATA(testDesktopFileApplyNow) -void TestShellClientRules::testDesktopFileApplyNow() +void TestXdgShellClientRules::testDesktopFileApplyNow() { // Currently, the desktop file name is derived from the app id. If the app id is // changed, then the old rules will be lost. Either setDesktopFileName should @@ -4260,7 +4260,7 @@ void TestShellClientRules::testDesktopFileApplyNow() TEST_DATA(testDesktopFileForceTemporarily) -void TestShellClientRules::testDesktopFileForceTemporarily() +void TestXdgShellClientRules::testDesktopFileForceTemporarily() { // Currently, the desktop file name is derived from the app id. If the app id is // changed, then the old rules will be lost. Either setDesktopFileName should @@ -4270,7 +4270,7 @@ void TestShellClientRules::testDesktopFileForceTemporarily() TEST_DATA(testActiveOpacityDontAffect) -void TestShellClientRules::testActiveOpacityDontAffect() +void TestXdgShellClientRules::testActiveOpacityDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -4287,7 +4287,7 @@ void TestShellClientRules::testActiveOpacityDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4305,7 +4305,7 @@ void TestShellClientRules::testActiveOpacityDontAffect() TEST_DATA(testActiveOpacityForce) -void TestShellClientRules::testActiveOpacityForce() +void TestXdgShellClientRules::testActiveOpacityForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -4322,7 +4322,7 @@ void TestShellClientRules::testActiveOpacityForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4338,7 +4338,7 @@ void TestShellClientRules::testActiveOpacityForce() TEST_DATA(testActiveOpacityForceTemporarily) -void TestShellClientRules::testActiveOpacityForceTemporarily() +void TestXdgShellClientRules::testActiveOpacityForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -4355,7 +4355,7 @@ void TestShellClientRules::testActiveOpacityForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4380,7 +4380,7 @@ void TestShellClientRules::testActiveOpacityForceTemporarily() TEST_DATA(testInactiveOpacityDontAffect) -void TestShellClientRules::testInactiveOpacityDontAffect() +void TestXdgShellClientRules::testInactiveOpacityDontAffect() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -4397,7 +4397,7 @@ void TestShellClientRules::testInactiveOpacityDontAffect() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4419,7 +4419,7 @@ void TestShellClientRules::testInactiveOpacityDontAffect() TEST_DATA(testInactiveOpacityForce) -void TestShellClientRules::testInactiveOpacityForce() +void TestXdgShellClientRules::testInactiveOpacityForce() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -4436,7 +4436,7 @@ void TestShellClientRules::testInactiveOpacityForce() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4459,7 +4459,7 @@ void TestShellClientRules::testInactiveOpacityForce() TEST_DATA(testInactiveOpacityForceTemporarily) -void TestShellClientRules::testInactiveOpacityForceTemporarily() +void TestXdgShellClientRules::testInactiveOpacityForceTemporarily() { // Initialize RuleBook with the test rule. auto config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); @@ -4476,7 +4476,7 @@ void TestShellClientRules::testInactiveOpacityForceTemporarily() // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); - ShellClient *client; + XdgShellClient *client; Surface *surface; XdgShellSurface *shellSurface; std::tie(client, surface, shellSurface) = createWindow(type, "org.kde.foo"); @@ -4508,7 +4508,7 @@ void TestShellClientRules::testInactiveOpacityForceTemporarily() QVERIFY(Test::waitForWindowDestroyed(client)); } -void TestShellClientRules::testMatchAfterNameChange() +void TestXdgShellClientRules::testMatchAfterNameChange() { KSharedConfig::Ptr config = KSharedConfig::openConfig(QString(), KConfig::SimpleConfig); config->group("General").writeEntry("count", 1); @@ -4540,5 +4540,5 @@ void TestShellClientRules::testMatchAfterNameChange() QCOMPARE(c->keepAbove(), true); } -WAYLANDTEST_MAIN(TestShellClientRules) -#include "shell_client_rules_test.moc" +WAYLANDTEST_MAIN(TestXdgShellClientRules) +#include "xdgshellclient_rules_test.moc" diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/xdgshellclient_test.cpp similarity index 92% rename from autotests/integration/shell_client_test.cpp rename to autotests/integration/xdgshellclient_test.cpp index 5f5c65dfb4..e4f8525401 100644 --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/xdgshellclient_test.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "effects.h" #include "deleted.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -59,9 +59,9 @@ along with this program. If not, see . using namespace KWin; using namespace KWayland::Client; -static const QString s_socketName = QStringLiteral("wayland_test_kwin_shell_client-0"); +static const QString s_socketName = QStringLiteral("wayland_test_kwin_xdgshellclient-0"); -class TestShellClient : public QObject +class TestXdgShellClient : public QObject { Q_OBJECT private Q_SLOTS: @@ -116,10 +116,10 @@ private Q_SLOTS: void testXdgWindowGeometry(); }; -void TestShellClient::initTestCase() +void TestXdgShellClient::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); @@ -137,7 +137,7 @@ void TestShellClient::initTestCase() waylandServer()->initWorkspace(); } -void TestShellClient::init() +void TestXdgShellClient::init() { QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration | Test::AdditionalWaylandInterface::XdgDecoration | @@ -147,12 +147,12 @@ void TestShellClient::init() KWin::Cursor::setPos(QPoint(1280, 512)); } -void TestShellClient::cleanup() +void TestXdgShellClient::cleanup() { Test::destroyWaylandConnection(); } -void TestShellClient::testMapUnmapMap_data() +void TestXdgShellClient::testMapUnmapMap_data() { QTest::addColumn("type"); @@ -160,7 +160,7 @@ void TestShellClient::testMapUnmapMap_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testMapUnmapMap() +void TestXdgShellClient::testMapUnmapMap() { // this test verifies that mapping a previously mapped window works correctly QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); @@ -179,7 +179,7 @@ void TestShellClient::testMapUnmapMap() QVERIFY(clientAddedSpy.isEmpty()); QVERIFY(clientAddedSpy.wait()); - auto client = clientAddedSpy.first().first().value(); + auto client = clientAddedSpy.first().first().value(); QVERIFY(client); QVERIFY(client->isShown(true)); QCOMPARE(client->isHiddenInternal(), false); @@ -205,12 +205,12 @@ void TestShellClient::testMapUnmapMap() QUuid deletedUuid; QCOMPARE(deletedUuid.isNull(), true); - connect(client, &ShellClient::windowClosed, this, [&deletedUuid] (Toplevel *, Deleted *d) { deletedUuid = d->internalId(); }); + connect(client, &XdgShellClient::windowClosed, this, [&deletedUuid] (Toplevel *, Deleted *d) { deletedUuid = d->internalId(); }); // now unmap - QSignalSpy hiddenSpy(client, &ShellClient::windowHidden); + QSignalSpy hiddenSpy(client, &XdgShellClient::windowHidden); QVERIFY(hiddenSpy.isValid()); - QSignalSpy windowClosedSpy(client, &ShellClient::windowClosed); + QSignalSpy windowClosedSpy(client, &XdgShellClient::windowClosed); QVERIFY(windowClosedSpy.isValid()); surface->attachBuffer(Buffer::Ptr()); surface->commit(Surface::CommitFlag::None); @@ -222,7 +222,7 @@ void TestShellClient::testMapUnmapMap() QCOMPARE(effectsWindowHiddenSpy.count(), 1); QCOMPARE(effectsWindowHiddenSpy.first().first().value(), client->effectWindow()); - QSignalSpy windowShownSpy(client, &ShellClient::windowShown); + QSignalSpy windowShownSpy(client, &XdgShellClient::windowShown); QVERIFY(windowShownSpy.isValid()); Test::render(surface.data(), QSize(100, 50), Qt::blue, QImage::Format_RGB32); QCOMPARE(clientAddedSpy.count(), 1); @@ -258,7 +258,7 @@ void TestShellClient::testMapUnmapMap() QCOMPARE(deletedUuid, uuid); } -void TestShellClient::testDesktopPresenceChanged() +void TestXdgShellClient::testDesktopPresenceChanged() { // this test verifies that the desktop presence changed signals are properly emitted QScopedPointer surface(Test::createSurface()); @@ -267,7 +267,7 @@ void TestShellClient::testDesktopPresenceChanged() QVERIFY(c); QCOMPARE(c->desktop(), 1); effects->setNumberOfDesktops(4); - QSignalSpy desktopPresenceChangedClientSpy(c, &ShellClient::desktopPresenceChanged); + QSignalSpy desktopPresenceChangedClientSpy(c, &XdgShellClient::desktopPresenceChanged); QVERIFY(desktopPresenceChangedClientSpy.isValid()); QSignalSpy desktopPresenceChangedWorkspaceSpy(workspace(), &Workspace::desktopPresenceChanged); QVERIFY(desktopPresenceChangedWorkspaceSpy.isValid()); @@ -291,7 +291,7 @@ void TestShellClient::testDesktopPresenceChanged() QCOMPARE(desktopPresenceChangedEffectsSpy.first().at(2).toInt(), 2); } -void TestShellClient::testTransientPositionAfterRemap() +void TestXdgShellClient::testTransientPositionAfterRemap() { // this test simulates the situation that a transient window gets reused and the parent window // moved between the two usages @@ -311,7 +311,7 @@ void TestShellClient::testTransientPositionAfterRemap() QCOMPARE(transient->geometry(), QRect(c->geometry().topLeft() + QPoint(5, 10), QSize(50, 40))); // unmap the transient - QSignalSpy windowHiddenSpy(transient, &ShellClient::windowHidden); + QSignalSpy windowHiddenSpy(transient, &XdgShellClient::windowHidden); QVERIFY(windowHiddenSpy.isValid()); transientSurface->attachBuffer(Buffer::Ptr()); transientSurface->commit(Surface::CommitFlag::None); @@ -321,14 +321,14 @@ void TestShellClient::testTransientPositionAfterRemap() c->setGeometry(c->geometry().translated(5, 10)); // now map the transient again - QSignalSpy windowShownSpy(transient, &ShellClient::windowShown); + QSignalSpy windowShownSpy(transient, &XdgShellClient::windowShown); QVERIFY(windowShownSpy.isValid()); Test::render(transientSurface.data(), QSize(50, 40), Qt::blue); QVERIFY(windowShownSpy.wait()); QCOMPARE(transient->geometry(), QRect(c->geometry().topLeft() + QPoint(5, 10), QSize(50, 40))); } -void TestShellClient::testWindowOutputs_data() +void TestXdgShellClient::testWindowOutputs_data() { QTest::addColumn("type"); @@ -336,7 +336,7 @@ void TestShellClient::testWindowOutputs_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testWindowOutputs() +void TestXdgShellClient::testWindowOutputs() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -374,7 +374,7 @@ void TestShellClient::testWindowOutputs() QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280,0)); } -void TestShellClient::testMinimizeActiveWindow_data() +void TestXdgShellClient::testMinimizeActiveWindow_data() { QTest::addColumn("type"); @@ -382,7 +382,7 @@ void TestShellClient::testMinimizeActiveWindow_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testMinimizeActiveWindow() +void TestXdgShellClient::testMinimizeActiveWindow() { // this test verifies that when minimizing the active window it gets deactivated QScopedPointer surface(Test::createSurface()); @@ -414,7 +414,7 @@ void TestShellClient::testMinimizeActiveWindow() QCOMPARE(workspace()->activeClient(), c); } -void TestShellClient::testFullscreen_data() +void TestXdgShellClient::testFullscreen_data() { QTest::addColumn("type"); QTest::addColumn("decoMode"); @@ -426,7 +426,7 @@ void TestShellClient::testFullscreen_data() QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; } -void TestShellClient::testFullscreen() +void TestXdgShellClient::testFullscreen() { // this test verifies that a window can be properly fullscreened QScopedPointer surface(Test::createSurface()); @@ -452,9 +452,9 @@ void TestShellClient::testFullscreen() QCOMPARE(c->clientSize(), QSize(100, 50)); QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); QCOMPARE(c->sizeForClientSize(c->clientSize()), c->geometry().size()); - QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged); + QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged); QVERIFY(fullscreenChangedSpy.isValid()); - QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), &XdgShellSurface::sizeChanged); QVERIFY(sizeChangeRequestedSpy.isValid()); @@ -492,7 +492,7 @@ void TestShellClient::testFullscreen() QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); } -void TestShellClient::testFullscreenRestore_data() +void TestXdgShellClient::testFullscreenRestore_data() { QTest::addColumn("type"); @@ -500,7 +500,7 @@ void TestShellClient::testFullscreenRestore_data() QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testFullscreenRestore() +void TestXdgShellClient::testFullscreenRestore() { // this test verifies that windows created fullscreen can be later properly restored QScopedPointer surface(Test::createSurface()); @@ -528,9 +528,9 @@ void TestShellClient::testFullscreenRestore() configureRequestedSpy.wait(100); - QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged); + QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged); QVERIFY(fullscreenChangedSpy.isValid()); - QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); // swap back to normal @@ -553,7 +553,7 @@ void TestShellClient::testFullscreenRestore() QCOMPARE(c->geometry().size(), QSize(100, 50)); } -void TestShellClient::testUserCanSetFullscreen_data() +void TestXdgShellClient::testUserCanSetFullscreen_data() { QTest::addColumn("type"); @@ -561,7 +561,7 @@ void TestShellClient::testUserCanSetFullscreen_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testUserCanSetFullscreen() +void TestXdgShellClient::testUserCanSetFullscreen() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -573,7 +573,7 @@ void TestShellClient::testUserCanSetFullscreen() QVERIFY(c->userCanSetFullScreen()); } -void TestShellClient::testUserSetFullscreen_data() +void TestXdgShellClient::testUserSetFullscreen_data() { QTest::addColumn("type"); @@ -581,7 +581,7 @@ void TestShellClient::testUserSetFullscreen_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testUserSetFullscreen() +void TestXdgShellClient::testUserSetFullscreen() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -635,7 +635,7 @@ void TestShellClient::testUserSetFullscreen() QVERIFY(!c->isFullScreen()); } -void TestShellClient::testMaximizedToFullscreen_data() +void TestXdgShellClient::testMaximizedToFullscreen_data() { QTest::addColumn("type"); QTest::addColumn("decoMode"); @@ -647,7 +647,7 @@ void TestShellClient::testMaximizedToFullscreen_data() QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; } -void TestShellClient::testMaximizedToFullscreen() +void TestXdgShellClient::testMaximizedToFullscreen() { // this test verifies that a window can be properly fullscreened after maximizing QScopedPointer surface(Test::createSurface()); @@ -671,9 +671,9 @@ void TestShellClient::testMaximizedToFullscreen() QVERIFY(!c->isFullScreen()); QCOMPARE(c->clientSize(), QSize(100, 50)); QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); - QSignalSpy fullscreenChangedSpy(c, &ShellClient::fullScreenChanged); + QSignalSpy fullscreenChangedSpy(c, &XdgShellClient::fullScreenChanged); QVERIFY(fullscreenChangedSpy.isValid()); - QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged); QVERIFY(geometryChangedSpy.isValid()); QSignalSpy sizeChangeRequestedSpy(shellSurface.data(), &XdgShellSurface::sizeChanged); QVERIFY(sizeChangeRequestedSpy.isValid()); @@ -728,7 +728,7 @@ void TestShellClient::testMaximizedToFullscreen() QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); } -void TestShellClient::testWindowOpensLargerThanScreen_data() +void TestXdgShellClient::testWindowOpensLargerThanScreen_data() { QTest::addColumn("type"); @@ -736,7 +736,7 @@ void TestShellClient::testWindowOpensLargerThanScreen_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testWindowOpensLargerThanScreen() +void TestXdgShellClient::testWindowOpensLargerThanScreen() { // this test creates a window which is as large as the screen, but is decorated // the window should get resized to fit into the screen, BUG: 366632 @@ -764,7 +764,7 @@ void TestShellClient::testWindowOpensLargerThanScreen() QVERIFY(sizeChangeRequestedSpy.wait(10)); } -void TestShellClient::testHidden_data() +void TestXdgShellClient::testHidden_data() { QTest::addColumn("type"); @@ -772,7 +772,7 @@ void TestShellClient::testHidden_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testHidden() +void TestXdgShellClient::testHidden() { // this test verifies that when hiding window it doesn't get shown QScopedPointer surface(Test::createSurface()); @@ -801,7 +801,7 @@ void TestShellClient::testHidden() //QCOMPARE(workspace()->activeClient(), c); } -void TestShellClient::testDesktopFileName() +void TestXdgShellClient::testDesktopFileName() { QIcon::setThemeName(QStringLiteral("breeze")); // this test verifies that desktop file name is passed correctly to the window @@ -813,19 +813,19 @@ void TestShellClient::testDesktopFileName() QVERIFY(c); QCOMPARE(c->desktopFileName(), QByteArrayLiteral("org.kde.foo")); QCOMPARE(c->resourceClass(), QByteArrayLiteral("org.kde.foo")); - QVERIFY(c->resourceName().startsWith("testShellClient")); + QVERIFY(c->resourceName().startsWith("testXdgShellClient")); // the desktop file does not exist, so icon should be generic Wayland QCOMPARE(c->icon().name(), QStringLiteral("wayland")); QSignalSpy desktopFileNameChangedSpy(c, &AbstractClient::desktopFileNameChanged); QVERIFY(desktopFileNameChangedSpy.isValid()); - QSignalSpy iconChangedSpy(c, &ShellClient::iconChanged); + QSignalSpy iconChangedSpy(c, &XdgShellClient::iconChanged); QVERIFY(iconChangedSpy.isValid()); shellSurface->setAppId(QByteArrayLiteral("org.kde.bar")); QVERIFY(desktopFileNameChangedSpy.wait()); QCOMPARE(c->desktopFileName(), QByteArrayLiteral("org.kde.bar")); QCOMPARE(c->resourceClass(), QByteArrayLiteral("org.kde.bar")); - QVERIFY(c->resourceName().startsWith("testShellClient")); + QVERIFY(c->resourceName().startsWith("testXdgShellClient")); // icon should still be wayland QCOMPARE(c->icon().name(), QStringLiteral("wayland")); QVERIFY(iconChangedSpy.isEmpty()); @@ -838,7 +838,7 @@ void TestShellClient::testDesktopFileName() QCOMPARE(c->icon().name(), QStringLiteral("kwin")); } -void TestShellClient::testCaptionSimplified() +void TestXdgShellClient::testCaptionSimplified() { // this test verifies that caption is properly trimmed // see BUG 323798 comment #12 @@ -853,7 +853,7 @@ void TestShellClient::testCaptionSimplified() QCOMPARE(c->caption(), origTitle.simplified()); } -void TestShellClient::testCaptionMultipleWindows() +void TestXdgShellClient::testCaptionMultipleWindows() { QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); @@ -890,7 +890,7 @@ void TestShellClient::testCaptionMultipleWindows() QCOMPARE(c4->caption(), QStringLiteral("bar")); QCOMPARE(c4->captionNormal(), QStringLiteral("bar")); QCOMPARE(c4->captionSuffix(), QString()); - QSignalSpy captionChangedSpy(c4, &ShellClient::captionChanged); + QSignalSpy captionChangedSpy(c4, &XdgShellClient::captionChanged); QVERIFY(captionChangedSpy.isValid()); shellSurface4->setTitle(QStringLiteral("foo")); QVERIFY(captionChangedSpy.wait()); @@ -900,7 +900,7 @@ void TestShellClient::testCaptionMultipleWindows() QCOMPARE(c4->captionSuffix(), QStringLiteral(" <4>")); } -void TestShellClient::testUnresponsiveWindow_data() +void TestXdgShellClient::testUnresponsiveWindow_data() { QTest::addColumn("shellInterface");//see env selection in qwaylandintegration.cpp QTest::addColumn("socketMode"); @@ -911,7 +911,7 @@ void TestShellClient::testUnresponsiveWindow_data() //TODO add XDG WM Base when Kwin relies on Qt 5.12 } -void TestShellClient::testUnresponsiveWindow() +void TestXdgShellClient::testUnresponsiveWindow() { // this test verifies that killWindow properly terminates a process // for this an external binary is launched @@ -986,7 +986,7 @@ void TestShellClient::testUnresponsiveWindow() QVERIFY(elapsed2 > 1800); //second ping comes in a second later } -void TestShellClient::testX11WindowId_data() +void TestXdgShellClient::testX11WindowId_data() { QTest::addColumn("type"); @@ -994,7 +994,7 @@ void TestShellClient::testX11WindowId_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testX11WindowId() +void TestXdgShellClient::testX11WindowId() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -1005,7 +1005,7 @@ void TestShellClient::testX11WindowId() QCOMPARE(c->window(), 0u); } -void TestShellClient::testAppMenu() +void TestXdgShellClient::testAppMenu() { //register a faux appmenu client QVERIFY (QDBusConnection::sessionBus().registerService("org.kde.kappmenu")); @@ -1015,7 +1015,7 @@ void TestShellClient::testAppMenu() auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); QVERIFY(c); QScopedPointer menu(Test::waylandAppMenuManager()->create(surface.data())); - QSignalSpy spy(c, &ShellClient::hasApplicationMenuChanged); + QSignalSpy spy(c, &XdgShellClient::hasApplicationMenuChanged); menu->setAddress("service.name", "object/path"); spy.wait(); QCOMPARE(c->hasApplicationMenu(), true); @@ -1025,7 +1025,7 @@ void TestShellClient::testAppMenu() QVERIFY (QDBusConnection::sessionBus().unregisterService("org.kde.kappmenu")); } -void TestShellClient::testNoDecorationModeRequested_data() +void TestXdgShellClient::testNoDecorationModeRequested_data() { QTest::addColumn("type"); @@ -1033,7 +1033,7 @@ void TestShellClient::testNoDecorationModeRequested_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testNoDecorationModeRequested() +void TestXdgShellClient::testNoDecorationModeRequested() { // this test verifies that the decoration follows the default mode if no mode is explicitly requested QScopedPointer surface(Test::createSurface()); @@ -1053,7 +1053,7 @@ void TestShellClient::testNoDecorationModeRequested() QCOMPARE(c->isDecorated(), true); } -void TestShellClient::testSendClientWithTransientToDesktop_data() +void TestXdgShellClient::testSendClientWithTransientToDesktop_data() { QTest::addColumn("type"); @@ -1061,7 +1061,7 @@ void TestShellClient::testSendClientWithTransientToDesktop_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testSendClientWithTransientToDesktop() +void TestXdgShellClient::testSendClientWithTransientToDesktop() { // this test verifies that when sending a client to a desktop all transients are also send to that desktop @@ -1108,7 +1108,7 @@ void TestShellClient::testSendClientWithTransientToDesktop() QCOMPARE(transient->desktop(), 1); } -void TestShellClient::testMinimizeWindowWithTransients_data() +void TestXdgShellClient::testMinimizeWindowWithTransients_data() { QTest::addColumn("type"); @@ -1116,7 +1116,7 @@ void TestShellClient::testMinimizeWindowWithTransients_data() QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testMinimizeWindowWithTransients() +void TestXdgShellClient::testMinimizeWindowWithTransients() { // this test verifies that when minimizing/unminimizing a window all its // transients will be minimized/unminimized as well @@ -1150,7 +1150,7 @@ void TestShellClient::testMinimizeWindowWithTransients() QVERIFY(!transient->isMinimized()); } -void TestShellClient::testXdgDecoration_data() +void TestXdgShellClient::testXdgDecoration_data() { QTest::addColumn("requestedMode"); QTest::addColumn("expectedMode"); @@ -1159,7 +1159,7 @@ void TestShellClient::testXdgDecoration_data() QTest::newRow("server side requested") << XdgDecoration::Mode::ServerSide << XdgDecoration::Mode::ServerSide; } -void TestShellClient::testXdgDecoration() +void TestXdgShellClient::testXdgDecoration() { QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); @@ -1189,14 +1189,14 @@ void TestShellClient::testXdgDecoration() QCOMPARE(c->isDecorated(), expectedMode == XdgDecoration::Mode::ServerSide); } -void TestShellClient::testXdgNeverCommitted() +void TestXdgShellClient::testXdgNeverCommitted() { - //check we don't crash if we create a shell object but delete the ShellClient before committing it + //check we don't crash if we create a shell object but delete the XdgShellClient before committing it QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly)); } -void TestShellClient::testXdgInitialState() +void TestXdgShellClient::testXdgInitialState() { QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly)); @@ -1217,7 +1217,7 @@ void TestShellClient::testXdgInitialState() QCOMPARE(c->size(), QSize(200, 100)); } -void TestShellClient::testXdgInitiallyMaximised() +void TestXdgShellClient::testXdgInitiallyMaximised() { QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly)); @@ -1243,7 +1243,7 @@ void TestShellClient::testXdgInitiallyMaximised() QCOMPARE(c->size(), QSize(1280, 1024)); } -void TestShellClient::testXdgInitiallyMinimized() +void TestXdgShellClient::testXdgInitiallyMinimized() { QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly)); @@ -1270,7 +1270,7 @@ void TestShellClient::testXdgInitiallyMinimized() QVERIFY(c->isMinimized()); } -void TestShellClient::testXdgWindowGeometry() +void TestXdgShellClient::testXdgWindowGeometry() { QScopedPointer surface(Test::createSurface()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data(), nullptr, Test::CreationSetup::CreateOnly)); @@ -1285,7 +1285,7 @@ void TestShellClient::testXdgWindowGeometry() auto c = Test::renderAndWaitForShown(surface.data(), QSize(200,100), Qt::blue); configureRequestedSpy.wait(); //window activated after being shown - QSignalSpy geometryChangedSpy(c, &ShellClient::geometryChanged); + QSignalSpy geometryChangedSpy(c, &XdgShellClient::geometryChanged); // resize to 300,200 in kwin terms c->setGeometry(QRect(100, 100, 300, 200)); QVERIFY(configureRequestedSpy.wait()); @@ -1306,5 +1306,5 @@ void TestShellClient::testXdgWindowGeometry() QCOMPARE(requestedFullScreenSize, QSize(1280, 1024)); } -WAYLANDTEST_MAIN(TestShellClient) -#include "shell_client_test.moc" +WAYLANDTEST_MAIN(TestXdgShellClient) +#include "xdgshellclient_test.moc" diff --git a/autotests/integration/xwayland_input_test.cpp b/autotests/integration/xwayland_input_test.cpp index 84bbf393b8..dcb2e9756f 100644 --- a/autotests/integration/xwayland_input_test.cpp +++ b/autotests/integration/xwayland_input_test.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include @@ -51,7 +51,7 @@ private Q_SLOTS: void XWaylandInputTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/autotests/integration/xwayland_selections_test.cpp b/autotests/integration/xwayland_selections_test.cpp index 07e5b7f0d4..ff20160e2b 100644 --- a/autotests/integration/xwayland_selections_test.cpp +++ b/autotests/integration/xwayland_selections_test.cpp @@ -20,7 +20,7 @@ along with this program. If not, see . *********************************************************************/ #include "kwin_wayland_test.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "screens.h" #include "wayland_server.h" #include "workspace.h" @@ -52,7 +52,7 @@ private: void XwaylandSelectionsTest::initTestCase() { QSKIP("Skipped as it fails for unknown reasons on build.kde.org"); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); diff --git a/composite.cpp b/composite.cpp index cee8a8d6e6..1a6ba4c045 100644 --- a/composite.cpp +++ b/composite.cpp @@ -30,7 +30,7 @@ along with this program. If not, see . #include "scene.h" #include "screens.h" #include "shadow.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "unmanaged.h" #include "useractions.h" #include "utils.h" @@ -365,7 +365,7 @@ void Compositor::startupWithWorkspace() if (auto *server = waylandServer()) { const auto clients = server->clients(); - for (ShellClient *c : clients) { + for (XdgShellClient *c : clients) { c->setupCompositing(); c->getShadow(); } @@ -440,10 +440,10 @@ void Compositor::stop() } if (waylandServer()) { - for (ShellClient *c : waylandServer()->clients()) { + for (XdgShellClient *c : waylandServer()->clients()) { m_scene->removeToplevel(c); } - for (ShellClient *c : waylandServer()->clients()) { + for (XdgShellClient *c : waylandServer()->clients()) { c->finishCompositing(); } } @@ -748,7 +748,7 @@ bool Compositor::windowRepaintsPending() const } if (auto *server = waylandServer()) { const auto &clients = server->clients(); - auto test = [](ShellClient *c) { + auto test = [](XdgShellClient *c) { return c->readyForPainting() && !c->repaints().isEmpty(); }; if (std::any_of(clients.begin(), clients.end(), test)) { diff --git a/debug_console.cpp b/debug_console.cpp index fcebd2b654..ad3211c517 100644 --- a/debug_console.cpp +++ b/debug_console.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "internal_client.h" #include "main.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "unmanaged.h" #include "wayland_server.h" #include "workspace.h" @@ -798,12 +798,12 @@ DebugConsoleModel::DebugConsoleModel(QObject *parent) } // TODO: that only includes windows getting shown, not those which are only created connect(waylandServer(), &WaylandServer::shellClientAdded, this, - [this] (ShellClient *c) { + [this] (XdgShellClient *c) { add(s_waylandClientId -1, m_shellClients, c); } ); connect(waylandServer(), &WaylandServer::shellClientRemoved, this, - [this] (ShellClient *c) { + [this] (XdgShellClient *c) { remove(s_waylandClientId -1, m_shellClients, c); } ); @@ -1113,7 +1113,7 @@ QVariant DebugConsoleModel::data(const QModelIndex &index, int role) const if (index.column() >= 2 || role != Qt::DisplayRole) { return QVariant(); } - if (ShellClient *c = shellClient(index)) { + if (XdgShellClient *c = shellClient(index)) { return propertyData(c, index, role); } else if (InternalClient *c = internalClient(index)) { return propertyData(c, index, role); @@ -1161,7 +1161,7 @@ static T *clientForIndex(const QModelIndex &index, const QVector &clients, i return clients.at(row); } -ShellClient *DebugConsoleModel::shellClient(const QModelIndex &index) const +XdgShellClient *DebugConsoleModel::shellClient(const QModelIndex &index) const { return clientForIndex(index, m_shellClients, s_waylandClientId); } @@ -1213,7 +1213,7 @@ SurfaceTreeModel::SurfaceTreeModel(QObject *parent) } if (waylandServer()) { connect(waylandServer(), &WaylandServer::shellClientAdded, this, - [this, reset] (ShellClient *c) { + [this, reset] (XdgShellClient *c) { connect(c->surface(), &SurfaceInterface::subSurfaceTreeChanged, this, reset); reset(); } diff --git a/debug_console.h b/debug_console.h index 09f6308ca9..9ecb78c587 100644 --- a/debug_console.h +++ b/debug_console.h @@ -41,7 +41,7 @@ namespace KWin class Client; class InternalClient; -class ShellClient; +class XdgShellClient; class Unmanaged; class DebugConsoleFilter; @@ -73,13 +73,13 @@ private: void add(int parentRow, QVector &clients, T *client); template void remove(int parentRow, QVector &clients, T *client); - ShellClient *shellClient(const QModelIndex &index) const; + XdgShellClient *shellClient(const QModelIndex &index) const; InternalClient *internalClient(const QModelIndex &index) const; Client *x11Client(const QModelIndex &index) const; Unmanaged *unmanaged(const QModelIndex &index) const; int topLevelRowCount() const; - QVector m_shellClients; + QVector m_shellClients; QVector m_internalClients; QVector m_x11Clients; QVector m_unmanageds; diff --git a/deleted.cpp b/deleted.cpp index 949e317ee9..80d9aa3d93 100644 --- a/deleted.cpp +++ b/deleted.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "group.h" #include "netinfo.h" #include "shadow.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "decorations/decoratedclient.h" #include "decorations/decorationrenderer.h" @@ -146,7 +146,7 @@ void Deleted::copyToDeleted(Toplevel* c) }); } - m_wasWaylandClient = qobject_cast(c) != nullptr; + m_wasWaylandClient = qobject_cast(c) != nullptr; m_wasX11Client = qobject_cast(c) != nullptr; m_wasPopupWindow = c->isPopupWindow(); m_wasOutline = c->isOutline(); diff --git a/effects.cpp b/effects.cpp index b1aef7e344..e1df727f43 100644 --- a/effects.cpp +++ b/effects.cpp @@ -55,7 +55,7 @@ along with this program. If not, see . #include "composite.h" #include "xcbutils.h" #include "platform.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "decorations/decorationbridge.h" @@ -257,19 +257,19 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene) } if (auto w = waylandServer()) { connect(w, &WaylandServer::shellClientAdded, this, - [this](ShellClient *c) { + [this](XdgShellClient *c) { if (c->readyForPainting()) - slotShellClientShown(c); + slotXdgShellClientShown(c); else - connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotShellClientShown); + connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotXdgShellClientShown); } ); const auto clients = waylandServer()->clients(); - for (ShellClient *c : clients) { + for (XdgShellClient *c : clients) { if (c->readyForPainting()) { setupAbstractClientConnections(c); } else { - connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotShellClientShown); + connect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotXdgShellClientShown); } } } @@ -574,9 +574,9 @@ void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t) emit windowAdded(c->effectWindow()); } -void EffectsHandlerImpl::slotShellClientShown(Toplevel *t) +void EffectsHandlerImpl::slotXdgShellClientShown(Toplevel *t) { - ShellClient *c = static_cast(t); + XdgShellClient *c = static_cast(t); setupAbstractClientConnections(c); emit windowAdded(t->effectWindow()); } @@ -1078,7 +1078,7 @@ EffectWindow* EffectsHandlerImpl::findWindow(WId id) const if (Unmanaged* w = Workspace::self()->findUnmanaged(id)) return w->effectWindow(); if (waylandServer()) { - if (ShellClient *w = waylandServer()->findClient(id)) { + if (XdgShellClient *w = waylandServer()->findClient(id)) { return w->effectWindow(); } } @@ -1088,7 +1088,7 @@ EffectWindow* EffectsHandlerImpl::findWindow(WId id) const EffectWindow* EffectsHandlerImpl::findWindow(KWayland::Server::SurfaceInterface *surf) const { if (waylandServer()) { - if (ShellClient *w = waylandServer()->findClient(surf)) { + if (XdgShellClient *w = waylandServer()->findClient(surf)) { return w->effectWindow(); } } @@ -1715,12 +1715,12 @@ EffectWindowImpl::EffectWindowImpl(Toplevel *toplevel) // emitted, effects can't distinguish managed windows from unmanaged // windows(e.g. combo box popups, popup menus, etc). Save value of the // managed property during construction of EffectWindow. At that time, - // parent can be Client, ShellClient, or Unmanaged. So, later on, when + // parent can be Client, XdgShellClient, or Unmanaged. So, later on, when // an instance of Deleted becomes parent of the EffectWindow, effects // can still figure out whether it is/was a managed window. managed = toplevel->isClient(); - waylandClient = qobject_cast(toplevel) != nullptr; + waylandClient = qobject_cast(toplevel) != nullptr; x11Client = qobject_cast(toplevel) != nullptr; } diff --git a/effects.h b/effects.h index 89d9173b13..de12c3fdeb 100644 --- a/effects.h +++ b/effects.h @@ -291,7 +291,7 @@ public Q_SLOTS: protected Q_SLOTS: void slotClientShown(KWin::Toplevel*); - void slotShellClientShown(KWin::Toplevel*); + void slotXdgShellClientShown(KWin::Toplevel*); void slotUnmanagedShown(KWin::Toplevel*); void slotWindowClosed(KWin::Toplevel *c, KWin::Deleted *d); void slotClientMaximized(KWin::AbstractClient *c, MaximizeMode maxMode); diff --git a/geometry.cpp b/geometry.cpp index 512cf9236b..2f11697a10 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -45,7 +45,7 @@ along with this program. If not, see . #include #include "outline.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include @@ -201,7 +201,7 @@ void Workspace::updateClientArea(bool force) } } if (waylandServer()) { - auto updateStrutsForWaylandClient = [&] (ShellClient *c) { + auto updateStrutsForWaylandClient = [&] (XdgShellClient *c) { // assuming that only docks have "struts" and that all docks have a strut if (!c->hasStrut()) { return; diff --git a/idle_inhibition.cpp b/idle_inhibition.cpp index aeabb7437a..3ef77860e2 100644 --- a/idle_inhibition.cpp +++ b/idle_inhibition.cpp @@ -20,7 +20,7 @@ along with this program. If not, see . *********************************************************************/ #include "idle_inhibition.h" #include "deleted.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "workspace.h" #include @@ -44,19 +44,19 @@ IdleInhibition::IdleInhibition(IdleInterface *idle) IdleInhibition::~IdleInhibition() = default; -void IdleInhibition::registerShellClient(ShellClient *client) +void IdleInhibition::registerXdgShellClient(XdgShellClient *client) { auto updateInhibit = [this, client] { update(client); }; m_connections[client] = connect(client->surface(), &SurfaceInterface::inhibitsIdleChanged, this, updateInhibit); - connect(client, &ShellClient::desktopChanged, this, updateInhibit); - connect(client, &ShellClient::clientMinimized, this, updateInhibit); - connect(client, &ShellClient::clientUnminimized, this, updateInhibit); - connect(client, &ShellClient::windowHidden, this, updateInhibit); - connect(client, &ShellClient::windowShown, this, updateInhibit); - connect(client, &ShellClient::windowClosed, this, + connect(client, &XdgShellClient::desktopChanged, this, updateInhibit); + connect(client, &XdgShellClient::clientMinimized, this, updateInhibit); + connect(client, &XdgShellClient::clientUnminimized, this, updateInhibit); + connect(client, &XdgShellClient::windowHidden, this, updateInhibit); + connect(client, &XdgShellClient::windowShown, this, updateInhibit); + connect(client, &XdgShellClient::windowClosed, this, [this, client] { uninhibit(client); auto it = m_connections.find(client); diff --git a/idle_inhibition.h b/idle_inhibition.h index 1cdae7cd1f..2eb7229f80 100644 --- a/idle_inhibition.h +++ b/idle_inhibition.h @@ -37,7 +37,7 @@ using KWayland::Server::IdleInterface; namespace KWin { class AbstractClient; -class ShellClient; +class XdgShellClient; class IdleInhibition : public QObject { @@ -46,7 +46,7 @@ public: explicit IdleInhibition(IdleInterface *idle); ~IdleInhibition() override; - void registerShellClient(ShellClient *client); + void registerXdgShellClient(XdgShellClient *client); bool isInhibited() const { return !m_idleInhibitors.isEmpty(); diff --git a/input.cpp b/input.cpp index fee89a68c7..2f79ea6263 100644 --- a/input.cpp +++ b/input.cpp @@ -43,7 +43,7 @@ along with this program. If not, see . #include "libinput/device.h" #include "platform.h" #include "popup_input_filter.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "xwl/xwayland_interface.h" #include "internal_client.h" diff --git a/layers.cpp b/layers.cpp index ee9219e080..5037098ecb 100644 --- a/layers.cpp +++ b/layers.cpp @@ -93,7 +93,7 @@ along with this program. If not, see . #include "effects.h" #include "composite.h" #include "screenedge.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include "internal_client.h" diff --git a/plugins/platforms/drm/egl_stream_backend.h b/plugins/platforms/drm/egl_stream_backend.h index 9ea9613e6e..9a21b17c47 100644 --- a/plugins/platforms/drm/egl_stream_backend.h +++ b/plugins/platforms/drm/egl_stream_backend.h @@ -30,7 +30,7 @@ namespace KWin class DrmBackend; class DrmOutput; class DrmBuffer; -class ShellClient; +class XdgShellClient; /** * @brief OpenGL Backend using Egl with an EGLDevice. diff --git a/pointer_input.cpp b/pointer_input.cpp index 35bd014448..49c9704f29 100644 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -27,7 +27,7 @@ along with this program. If not, see . #include "input_event_spy.h" #include "osd.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_cursor_theme.h" #include "wayland_server.h" #include "workspace.h" diff --git a/popup_input_filter.cpp b/popup_input_filter.cpp index fc74540ed6..93f79da0e6 100644 --- a/popup_input_filter.cpp +++ b/popup_input_filter.cpp @@ -20,7 +20,7 @@ */ #include "popup_input_filter.h" #include "deleted.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include diff --git a/popup_input_filter.h b/popup_input_filter.h index b49a74663c..8d34e1be2d 100644 --- a/popup_input_filter.h +++ b/popup_input_filter.h @@ -29,7 +29,7 @@ namespace KWin { class Toplevel; -class ShellClient; +class XdgShellClient; class PopupInputFilter : public QObject, public InputEventFilter { diff --git a/scripting/scripting_model.cpp b/scripting/scripting_model.cpp index 77417851d7..a8774feff1 100644 --- a/scripting/scripting_model.cpp +++ b/scripting/scripting_model.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . #include "client.h" #include "screens.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" namespace KWin { diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index a9844e7bc0..6c5b1588e2 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include "../client.h" #include "../outline.h" #include "../screens.h" -#include "../shell_client.h" +#include "../xdgshellclient.h" #include "../virtualdesktops.h" #include "../wayland_server.h" #include "../workspace.h" diff --git a/thumbnailitem.cpp b/thumbnailitem.cpp index 662512a859..b968f125fa 100644 --- a/thumbnailitem.cpp +++ b/thumbnailitem.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "composite.h" #include "effects.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" // Qt #include diff --git a/useractions.cpp b/useractions.cpp index d57674fabb..b69020aa1d 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -43,7 +43,7 @@ along with this program. If not, see . #include "effects.h" #include "platform.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "virtualdesktops.h" #include "scripting/scripting.h" diff --git a/virtualkeyboard.cpp b/virtualkeyboard.cpp index 7ee7e5e2ce..5533e8d602 100644 --- a/virtualkeyboard.cpp +++ b/virtualkeyboard.cpp @@ -26,7 +26,7 @@ along with this program. If not, see . #include "wayland_server.h" #include "workspace.h" #include "xkb.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include diff --git a/wayland_server.cpp b/wayland_server.cpp index 6c435ff9b0..d5adf4aa11 100644 --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -23,7 +23,7 @@ along with this program. If not, see . #include "composite.h" #include "idle_inhibition.h" #include "screens.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "workspace.h" // Client @@ -157,7 +157,7 @@ void WaylandServer::createSurface(T *surface) if (surface->client() == m_screenLockerClientConnection) { ScreenLocker::KSldApp::self()->lockScreenShown(); } - ShellClient *client = new ShellClient(surface); + XdgShellClient *client = new XdgShellClient(surface); if (ServerSideDecorationInterface *deco = ServerSideDecorationInterface::get(surface->surface())) { client->installServerSideDecoration(deco); } @@ -180,7 +180,7 @@ void WaylandServer::createSurface(T *surface) if (client->readyForPainting()) { emit shellClientAdded(client); } else { - connect(client, &ShellClient::windowShown, this, &WaylandServer::shellClientShown); + connect(client, &XdgShellClient::windowShown, this, &WaylandServer::shellClientShown); } //not directly connected as the connection is tied to client instead of this @@ -325,7 +325,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags) m_xdgDecorationManager = m_display->createXdgDecorationManager(m_xdgShell, m_display); m_xdgDecorationManager->create(); connect(m_xdgDecorationManager, &XdgDecorationManagerInterface::xdgDecorationInterfaceCreated, this, [this] (XdgDecorationInterface *deco) { - if (ShellClient *client = findClient(deco->surface()->surface())) { + if (XdgShellClient *client = findClient(deco->surface()->surface())) { client->installXdgDecoration(deco); } }); @@ -340,13 +340,13 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags) m_idle = m_display->createIdle(m_display); m_idle->create(); auto idleInhibition = new IdleInhibition(m_idle); - connect(this, &WaylandServer::shellClientAdded, idleInhibition, &IdleInhibition::registerShellClient); + connect(this, &WaylandServer::shellClientAdded, idleInhibition, &IdleInhibition::registerXdgShellClient); m_display->createIdleInhibitManager(IdleInhibitManagerInterfaceVersion::UnstableV1, m_display)->create(); m_plasmaShell = m_display->createPlasmaShell(m_display); m_plasmaShell->create(); connect(m_plasmaShell, &PlasmaShellInterface::surfaceCreated, [this] (PlasmaShellSurfaceInterface *surface) { - if (ShellClient *client = findClient(surface->surface())) { + if (XdgShellClient *client = findClient(surface->surface())) { client->installPlasmaShellSurface(surface); } else { m_plasmaShellSurfaces << surface; @@ -362,7 +362,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags) m_appMenuManager->create(); connect(m_appMenuManager, &AppMenuManagerInterface::appMenuCreated, [this] (AppMenuInterface *appMenu) { - if (ShellClient *client = findClient(appMenu->surface())) { + if (XdgShellClient *client = findClient(appMenu->surface())) { client->installAppMenu(appMenu); } } @@ -371,7 +371,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags) m_paletteManager->create(); connect(m_paletteManager, &ServerSideDecorationPaletteManagerInterface::paletteCreated, [this] (ServerSideDecorationPaletteInterface *palette) { - if (ShellClient *client = findClient(palette->surface())) { + if (XdgShellClient *client = findClient(palette->surface())) { client->installPalette(palette); } } @@ -417,7 +417,7 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags) m_decorationManager = m_display->createServerSideDecorationManager(m_display); connect(m_decorationManager, &ServerSideDecorationManagerInterface::decorationCreated, this, [this] (ServerSideDecorationInterface *deco) { - if (ShellClient *c = findClient(deco->surface())) { + if (XdgShellClient *c = findClient(deco->surface())) { c->installServerSideDecoration(deco); } connect(deco, &ServerSideDecorationInterface::modeRequested, this, @@ -458,12 +458,12 @@ SurfaceInterface *WaylandServer::findForeignTransientForSurface(SurfaceInterface void WaylandServer::shellClientShown(Toplevel *t) { - ShellClient *c = dynamic_cast(t); + XdgShellClient *c = dynamic_cast(t); if (!c) { - qCWarning(KWIN_CORE) << "Failed to cast a Toplevel which is supposed to be a ShellClient to ShellClient"; + qCWarning(KWIN_CORE) << "Failed to cast a Toplevel which is supposed to be a XdgShellClient to XdgShellClient"; return; } - disconnect(c, &ShellClient::windowShown, this, &WaylandServer::shellClientShown); + disconnect(c, &XdgShellClient::windowShown, this, &WaylandServer::shellClientShown); emit shellClientAdded(c); } @@ -627,7 +627,7 @@ void WaylandServer::createInternalConnection() m_internalConnection.client->initConnection(); } -void WaylandServer::removeClient(ShellClient *c) +void WaylandServer::removeClient(XdgShellClient *c) { m_clients.removeAll(c); emit shellClientRemoved(c); @@ -644,10 +644,10 @@ void WaylandServer::dispatch() m_display->dispatchEvents(0); } -static ShellClient *findClientInList(const QList &clients, quint32 id) +static XdgShellClient *findClientInList(const QList &clients, quint32 id) { auto it = std::find_if(clients.begin(), clients.end(), - [id] (ShellClient *c) { + [id] (XdgShellClient *c) { return c->windowId() == id; } ); @@ -657,10 +657,10 @@ static ShellClient *findClientInList(const QList &clients, quint32 return *it; } -static ShellClient *findClientInList(const QList &clients, KWayland::Server::SurfaceInterface *surface) +static XdgShellClient *findClientInList(const QList &clients, KWayland::Server::SurfaceInterface *surface) { auto it = std::find_if(clients.begin(), clients.end(), - [surface] (ShellClient *c) { + [surface] (XdgShellClient *c) { return c->surface() == surface; } ); @@ -670,23 +670,23 @@ static ShellClient *findClientInList(const QList &clients, KWaylan return *it; } -ShellClient *WaylandServer::findClient(quint32 id) const +XdgShellClient *WaylandServer::findClient(quint32 id) const { if (id == 0) { return nullptr; } - if (ShellClient *c = findClientInList(m_clients, id)) { + if (XdgShellClient *c = findClientInList(m_clients, id)) { return c; } return nullptr; } -ShellClient *WaylandServer::findClient(SurfaceInterface *surface) const +XdgShellClient *WaylandServer::findClient(SurfaceInterface *surface) const { if (!surface) { return nullptr; } - if (ShellClient *c = findClientInList(m_clients, surface)) { + if (XdgShellClient *c = findClientInList(m_clients, surface)) { return c; } return nullptr; diff --git a/wayland_server.h b/wayland_server.h index 043919fd12..71aab03f23 100644 --- a/wayland_server.h +++ b/wayland_server.h @@ -72,7 +72,7 @@ class KeyStateInterface; namespace KWin { -class ShellClient; +class XdgShellClient; class AbstractClient; class Toplevel; @@ -119,12 +119,12 @@ public: return m_xdgOutputManager; } - QList clients() const { + QList clients() const { return m_clients; } - void removeClient(ShellClient *c); - ShellClient *findClient(quint32 id) const; - ShellClient *findClient(KWayland::Server::SurfaceInterface *surface) const; + void removeClient(XdgShellClient *c); + XdgShellClient *findClient(quint32 id) const; + XdgShellClient *findClient(KWayland::Server::SurfaceInterface *surface) const; AbstractClient *findAbstractClient(KWayland::Server::SurfaceInterface *surface) const; /** @@ -217,8 +217,8 @@ public: void updateKeyState(KWin::Xkb::LEDs leds); Q_SIGNALS: - void shellClientAdded(KWin::ShellClient*); - void shellClientRemoved(KWin::ShellClient*); + void shellClientAdded(KWin::XdgShellClient *); + void shellClientRemoved(KWin::XdgShellClient *); void terminatingInternalClientConnection(); void initialized(); void foreignTransientChanged(KWayland::Server::SurfaceInterface *child); @@ -266,7 +266,7 @@ private: } m_internalConnection; KWayland::Server::XdgForeignInterface *m_XdgForeign = nullptr; KWayland::Server::KeyStateInterface *m_keyState = nullptr; - QList m_clients; + QList m_clients; QHash m_clientIds; InitalizationFlags m_initFlags; QVector m_plasmaShellSurfaces; diff --git a/workspace.cpp b/workspace.cpp index 19ee5b6d89..8dbf5e6295 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -56,7 +56,7 @@ along with this program. If not, see . #include "unmanaged.h" #include "useractions.h" #include "virtualdesktops.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "was_user_interaction_x11_filter.h" #include "wayland_server.h" #include "xcbutils.h" @@ -291,7 +291,7 @@ void Workspace::init() if (auto w = waylandServer()) { connect(w, &WaylandServer::shellClientAdded, this, - [this] (ShellClient *c) { + [this] (XdgShellClient *c) { setupClientConnections(c); c->updateDecoration(false); updateClientLayer(c); @@ -326,7 +326,7 @@ void Workspace::init() activateClient(c); } updateTabbox(); - connect(c, &ShellClient::windowShown, this, + connect(c, &XdgShellClient::windowShown, this, [this, c] { updateClientLayer(c); // TODO: when else should we send the client through placement? @@ -342,7 +342,7 @@ void Workspace::init() } } ); - connect(c, &ShellClient::windowHidden, this, + connect(c, &XdgShellClient::windowHidden, this, [this] { // TODO: update tabbox if it's displayed markXStackingOrderAsDirty(); @@ -353,7 +353,7 @@ void Workspace::init() } ); connect(w, &WaylandServer::shellClientRemoved, this, - [this] (ShellClient *c) { + [this] (XdgShellClient *c) { m_allClients.removeAll(c); if (c == most_recently_raised) { most_recently_raised = nullptr; @@ -560,8 +560,8 @@ Workspace::~Workspace() Client::cleanupX11(); if (waylandServer()) { - const QList shellClients = waylandServer()->clients(); - for (ShellClient *shellClient : shellClients) { + const QList shellClients = waylandServer()->clients(); + for (XdgShellClient *shellClient : shellClients) { shellClient->destroyClient(); } } diff --git a/workspace.h b/workspace.h index dc0bd941da..70a17bcf58 100644 --- a/workspace.h +++ b/workspace.h @@ -133,7 +133,7 @@ public: * @brief Finds a Toplevel for the internal window @p w. * * Internal window means a window created by KWin itself. On X11 this is an Unmanaged - * and mapped by the window id, on Wayland a ShellClient mapped on the internal window id. + * and mapped by the window id, on Wayland a XdgShellClient mapped on the internal window id. * * @returns Toplevel */ diff --git a/shell_client.cpp b/xdgshellclient.cpp similarity index 90% rename from shell_client.cpp rename to xdgshellclient.cpp index 3f08b31a7c..6be936106d 100644 --- a/shell_client.cpp +++ b/xdgshellclient.cpp @@ -19,7 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -#include "shell_client.h" +#include "xdgshellclient.h" #include "composite.h" #include "cursor.h" #include "deleted.h" @@ -66,7 +66,7 @@ using namespace KWayland::Server; namespace KWin { -ShellClient::ShellClient(XdgShellSurfaceInterface *surface) +XdgShellClient::XdgShellClient(XdgShellSurfaceInterface *surface) : AbstractClient() , m_xdgShellSurface(surface) , m_xdgShellPopup(nullptr) @@ -74,10 +74,10 @@ ShellClient::ShellClient(XdgShellSurfaceInterface *surface) setSurface(surface->surface()); m_requestGeometryBlockCounter++; init(); - connect(surface->surface(), &SurfaceInterface::committed, this, &ShellClient::finishInit); + connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit); } -ShellClient::ShellClient(XdgShellPopupInterface *surface) +XdgShellClient::XdgShellClient(XdgShellPopupInterface *surface) : AbstractClient() , m_xdgShellSurface(nullptr) , m_xdgShellPopup(surface) @@ -85,18 +85,18 @@ ShellClient::ShellClient(XdgShellPopupInterface *surface) setSurface(surface->surface()); m_requestGeometryBlockCounter++; init(); - connect(surface->surface(), &SurfaceInterface::committed, this, &ShellClient::finishInit); + connect(surface->surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit); } -ShellClient::~ShellClient() = default; +XdgShellClient::~XdgShellClient() = default; template -void ShellClient::initSurface(T *shellSurface) +void XdgShellClient::initSurface(T *shellSurface) { m_caption = shellSurface->title().simplified(); // delay till end of init - QTimer::singleShot(0, this, &ShellClient::updateCaption); - connect(shellSurface, &T::destroyed, this, &ShellClient::destroyClient); + QTimer::singleShot(0, this, &XdgShellClient::updateCaption); + connect(shellSurface, &T::destroyed, this, &XdgShellClient::destroyClient); connect(shellSurface, &T::titleChanged, this, [this] (const QString &s) { const auto oldSuffix = m_captionSuffix; @@ -181,17 +181,17 @@ void ShellClient::initSurface(T *shellSurface) } ); // TODO: consider output! - connect(shellSurface, &T::fullscreenChanged, this, &ShellClient::clientFullScreenChanged); + connect(shellSurface, &T::fullscreenChanged, this, &XdgShellClient::clientFullScreenChanged); - connect(shellSurface, &T::transientForChanged, this, &ShellClient::setTransient); + connect(shellSurface, &T::transientForChanged, this, &XdgShellClient::setTransient); - connect(this, &ShellClient::geometryChanged, this, &ShellClient::updateClientOutputs); - connect(screens(), &Screens::changed, this, &ShellClient::updateClientOutputs); + connect(this, &XdgShellClient::geometryChanged, this, &XdgShellClient::updateClientOutputs); + connect(screens(), &Screens::changed, this, &XdgShellClient::updateClientOutputs); } -void ShellClient::init() +void XdgShellClient::init() { - connect(this, &ShellClient::desktopFileNameChanged, this, &ShellClient::updateIcon); + connect(this, &XdgShellClient::desktopFileNameChanged, this, &XdgShellClient::updateIcon); createWindowId(); setupCompositing(); updateIcon(); @@ -209,9 +209,9 @@ void ShellClient::init() doSetGeometry(QRect(pos(), m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom()))); } ); - connect(s, &SurfaceInterface::unmapped, this, &ShellClient::unmap); - connect(s, &SurfaceInterface::unbound, this, &ShellClient::destroyClient); - connect(s, &SurfaceInterface::destroyed, this, &ShellClient::destroyClient); + connect(s, &SurfaceInterface::unmapped, this, &XdgShellClient::unmap); + connect(s, &SurfaceInterface::unbound, this, &XdgShellClient::destroyClient); + connect(s, &SurfaceInterface::destroyed, this, &XdgShellClient::destroyClient); if (m_xdgShellSurface) { initSurface(m_xdgShellSurface); @@ -293,7 +293,7 @@ void ShellClient::init() m_lastAckedConfigureRequest = serial; }); - connect(m_xdgShellPopup, &XdgShellPopupInterface::destroyed, this, &ShellClient::destroyClient); + connect(m_xdgShellPopup, &XdgShellPopupInterface::destroyed, this, &XdgShellClient::destroyClient); } // set initial desktop @@ -313,9 +313,9 @@ void ShellClient::init() AbstractClient::updateColorScheme(QString()); } -void ShellClient::finishInit() { +void XdgShellClient::finishInit() { SurfaceInterface *s = surface(); - disconnect(s, &SurfaceInterface::committed, this, &ShellClient::finishInit); + disconnect(s, &SurfaceInterface::committed, this, &XdgShellClient::finishInit); bool needsPlacement = !isInitialPositionSet(); @@ -371,7 +371,7 @@ void ShellClient::finishInit() { m_isInitialized = true; } -void ShellClient::destroyClient() +void XdgShellClient::destroyClient() { m_closing = true; #ifdef KWIN_BUILD_TABBOX @@ -416,12 +416,12 @@ void ShellClient::destroyClient() deleteClient(this); } -void ShellClient::deleteClient(ShellClient *c) +void XdgShellClient::deleteClient(XdgShellClient *c) { delete c; } -QSize ShellClient::toWindowGeometry(const QSize &size) const +QSize XdgShellClient::toWindowGeometry(const QSize &size) const { QSize adjustedSize = size - QSize(borderLeft() + borderRight(), borderTop() + borderBottom()); // a client going fullscreen should have the window the contents size of the screen @@ -431,35 +431,35 @@ QSize ShellClient::toWindowGeometry(const QSize &size) const return adjustedSize; } -QStringList ShellClient::activities() const +QStringList XdgShellClient::activities() const { // TODO: implement return QStringList(); } -QPoint ShellClient::clientContentPos() const +QPoint XdgShellClient::clientContentPos() const { return -1 * clientPos(); } -QSize ShellClient::clientSize() const +QSize XdgShellClient::clientSize() const { return m_clientSize; } -void ShellClient::debug(QDebug &stream) const +void XdgShellClient::debug(QDebug &stream) const { stream.nospace(); - stream << "\'ShellClient:" << surface() << ";WMCLASS:" << resourceClass() << ":" + stream << "\'XdgShellClient:" << surface() << ";WMCLASS:" << resourceClass() << ":" << resourceName() << ";Caption:" << caption() << "\'"; } -bool ShellClient::belongsToDesktop() const +bool XdgShellClient::belongsToDesktop() const { const auto clients = waylandServer()->clients(); return std::any_of(clients.constBegin(), clients.constEnd(), - [this](const ShellClient *client) { + [this](const XdgShellClient *client) { if (belongsToSameApplication(client, SameApplicationChecks())) { return client->isDesktop(); } @@ -468,7 +468,7 @@ bool ShellClient::belongsToDesktop() const ); } -Layer ShellClient::layerForDock() const +Layer XdgShellClient::layerForDock() const { if (m_plasmaShellSurface) { switch (m_plasmaShellSurface->panelBehavior()) { @@ -487,13 +487,13 @@ Layer ShellClient::layerForDock() const return AbstractClient::layerForDock(); } -QRect ShellClient::transparentRect() const +QRect XdgShellClient::transparentRect() const { // TODO: implement return QRect(); } -NET::WindowType ShellClient::windowType(bool direct, int supported_types) const +NET::WindowType XdgShellClient::windowType(bool direct, int supported_types) const { // TODO: implement Q_UNUSED(direct) @@ -501,12 +501,12 @@ NET::WindowType ShellClient::windowType(bool direct, int supported_types) const return m_windowType; } -double ShellClient::opacity() const +double XdgShellClient::opacity() const { return m_opacity; } -void ShellClient::setOpacity(double opacity) +void XdgShellClient::setOpacity(double opacity) { const qreal newOpacity = qBound(0.0, opacity, 1.0); if (newOpacity == m_opacity) { @@ -518,7 +518,7 @@ void ShellClient::setOpacity(double opacity) emit opacityChanged(this, oldOpacity); } -void ShellClient::addDamage(const QRegion &damage) +void XdgShellClient::addDamage(const QRegion &damage) { auto s = surface(); if (s->size().isValid()) { @@ -532,7 +532,7 @@ void ShellClient::addDamage(const QRegion &damage) Toplevel::addDamage(damage); } -void ShellClient::markAsMapped() +void XdgShellClient::markAsMapped() { if (!m_unmapped) { return; @@ -551,7 +551,7 @@ void ShellClient::markAsMapped() updateShowOnScreenEdge(); } -void ShellClient::createDecoration(const QRect &oldGeom) +void XdgShellClient::createDecoration(const QRect &oldGeom) { KDecoration2::Decoration *decoration = Decoration::DecorationBridge::self()->createDecoration(this); if (decoration) { @@ -576,7 +576,7 @@ void ShellClient::createDecoration(const QRect &oldGeom) emit geometryShapeChanged(this, oldGeom); } -void ShellClient::updateDecoration(bool check_workspace_pos, bool force) +void XdgShellClient::updateDecoration(bool check_workspace_pos, bool force) { if (!force && ((!isDecorated() && noBorder()) || (isDecorated() && !noBorder()))) @@ -606,7 +606,7 @@ void ShellClient::updateDecoration(bool check_workspace_pos, bool force) blockGeometryUpdates(false); } -void ShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) +void XdgShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) { const QRect newGeometry = rules()->checkGeometry(QRect(x, y, w, h)); @@ -640,7 +640,7 @@ void ShellClient::setGeometry(int x, int y, int w, int h, ForceGeometry_t force) } } -void ShellClient::doSetGeometry(const QRect &rect) +void XdgShellClient::doSetGeometry(const QRect &rect) { if (geom == rect && pendingGeometryUpdate() == PendingGeometryNone) { return; @@ -672,12 +672,12 @@ void ShellClient::doSetGeometry(const QRect &rect) } } -QByteArray ShellClient::windowRole() const +QByteArray XdgShellClient::windowRole() const { return QByteArray(); } -bool ShellClient::belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const +bool XdgShellClient::belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const { if (checks.testFlag(SameApplicationCheck::AllowCrossProcesses)) { if (other->desktopFileName() == desktopFileName()) { @@ -690,12 +690,12 @@ bool ShellClient::belongsToSameApplication(const AbstractClient *other, SameAppl return false; } -void ShellClient::blockActivityUpdates(bool b) +void XdgShellClient::blockActivityUpdates(bool b) { Q_UNUSED(b) } -void ShellClient::updateCaption() +void XdgShellClient::updateCaption() { const QString oldSuffix = m_captionSuffix; const auto shortcut = shortcutCaptionSuffix(); @@ -712,7 +712,7 @@ void ShellClient::updateCaption() } } -void ShellClient::closeWindow() +void XdgShellClient::closeWindow() { if (m_xdgShellSurface && isCloseable()) { m_xdgShellSurface->close(); @@ -721,13 +721,13 @@ void ShellClient::closeWindow() } } -AbstractClient *ShellClient::findModal(bool allow_itself) +AbstractClient *XdgShellClient::findModal(bool allow_itself) { Q_UNUSED(allow_itself) return nullptr; } -bool ShellClient::isCloseable() const +bool XdgShellClient::isCloseable() const { if (m_windowType == NET::Desktop || m_windowType == NET::Dock) { return false; @@ -738,12 +738,12 @@ bool ShellClient::isCloseable() const return false; } -bool ShellClient::isFullScreen() const +bool XdgShellClient::isFullScreen() const { return m_fullScreen; } -bool ShellClient::isMaximizable() const +bool XdgShellClient::isMaximizable() const { if (!isResizable()) { return false; @@ -754,7 +754,7 @@ bool ShellClient::isMaximizable() const return true; } -bool ShellClient::isMinimizable() const +bool XdgShellClient::isMinimizable() const { if (!rules()->checkMinimize(true)) { return false; @@ -762,7 +762,7 @@ bool ShellClient::isMinimizable() const return (!m_plasmaShellSurface || m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Normal); } -bool ShellClient::isMovable() const +bool XdgShellClient::isMovable() const { if (rules()->checkPosition(invalidPoint) != invalidPoint) { return false; @@ -776,7 +776,7 @@ bool ShellClient::isMovable() const return true; } -bool ShellClient::isMovableAcrossScreens() const +bool XdgShellClient::isMovableAcrossScreens() const { if (rules()->checkPosition(invalidPoint) != invalidPoint) { return false; @@ -790,7 +790,7 @@ bool ShellClient::isMovableAcrossScreens() const return true; } -bool ShellClient::isResizable() const +bool XdgShellClient::isResizable() const { if (rules()->checkSize(QSize()).isValid()) { return false; @@ -804,13 +804,13 @@ bool ShellClient::isResizable() const return true; } -bool ShellClient::isShown(bool shaded_is_shown) const +bool XdgShellClient::isShown(bool shaded_is_shown) const { Q_UNUSED(shaded_is_shown) return !m_closing && !m_unmapped && !isMinimized() && !m_hidden; } -void ShellClient::hideClient(bool hide) +void XdgShellClient::hideClient(bool hide) { if (m_hidden == hide) { return; @@ -826,7 +826,7 @@ void ShellClient::hideClient(bool hide) } static bool changeMaximizeRecursion = false; -void ShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust) +void XdgShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust) { if (changeMaximizeRecursion) { return; @@ -927,17 +927,17 @@ void ShellClient::changeMaximize(bool horizontal, bool vertical, bool adjust) } } -MaximizeMode ShellClient::maximizeMode() const +MaximizeMode XdgShellClient::maximizeMode() const { return m_maximizeMode; } -MaximizeMode ShellClient::requestedMaximizeMode() const +MaximizeMode XdgShellClient::requestedMaximizeMode() const { return m_requestedMaximizeMode; } -bool ShellClient::noBorder() const +bool XdgShellClient::noBorder() const { if (m_serverDecoration) { if (m_serverDecoration->mode() == ServerSideDecorationManagerInterface::Mode::Server) { @@ -950,7 +950,7 @@ bool ShellClient::noBorder() const return true; } -bool ShellClient::isFullScreenable() const +bool XdgShellClient::isFullScreenable() const { if (!rules()->checkFullScreen(true)) { return false; @@ -958,7 +958,7 @@ bool ShellClient::isFullScreenable() const return !isSpecialWindow(); } -void ShellClient::setFullScreen(bool set, bool user) +void XdgShellClient::setFullScreen(bool set, bool user) { set = rules()->checkFullScreen(set); @@ -1009,7 +1009,7 @@ void ShellClient::setFullScreen(bool set, bool user) emit fullScreenChanged(); } -void ShellClient::setNoBorder(bool set) +void XdgShellClient::setNoBorder(bool set) { if (!userCanSetNoBorder()) { return; @@ -1023,12 +1023,12 @@ void ShellClient::setNoBorder(bool set) updateWindowRules(Rules::NoBorder); } -void ShellClient::setOnAllActivities(bool set) +void XdgShellClient::setOnAllActivities(bool set) { Q_UNUSED(set) } -void ShellClient::takeFocus() +void XdgShellClient::takeFocus() { if (rules()->checkAcceptFocus(wantsInput())) { if (m_xdgShellSurface) { @@ -1043,7 +1043,7 @@ void ShellClient::takeFocus() } } -void ShellClient::doSetActive() +void XdgShellClient::doSetActive() { if (!isActive()) { return; @@ -1052,7 +1052,7 @@ void ShellClient::doSetActive() workspace()->focusToNull(); } -bool ShellClient::userCanSetFullScreen() const +bool XdgShellClient::userCanSetFullScreen() const { if (m_xdgShellSurface) { return true; @@ -1060,7 +1060,7 @@ bool ShellClient::userCanSetFullScreen() const return false; } -bool ShellClient::userCanSetNoBorder() const +bool XdgShellClient::userCanSetNoBorder() const { if (m_serverDecoration && m_serverDecoration->mode() == ServerSideDecorationManagerInterface::Mode::Server) { return !isFullScreen() && !isShade(); @@ -1071,12 +1071,12 @@ bool ShellClient::userCanSetNoBorder() const return false; } -bool ShellClient::wantsInput() const +bool XdgShellClient::wantsInput() const { return rules()->checkAcceptFocus(acceptsFocus()); } -bool ShellClient::acceptsFocus() const +bool XdgShellClient::acceptsFocus() const { if (waylandServer()->inputMethodConnection() == surface()->client()) { return false; @@ -1104,27 +1104,27 @@ bool ShellClient::acceptsFocus() const return false; } -void ShellClient::createWindowId() +void XdgShellClient::createWindowId() { m_windowId = waylandServer()->createWindowId(surface()); } -pid_t ShellClient::pid() const +pid_t XdgShellClient::pid() const { return surface()->client()->processId(); } -bool ShellClient::isLockScreen() const +bool XdgShellClient::isLockScreen() const { return surface()->client() == waylandServer()->screenLockerClientConnection(); } -bool ShellClient::isInputMethod() const +bool XdgShellClient::isInputMethod() const { return surface()->client() == waylandServer()->inputMethodConnection(); } -void ShellClient::requestGeometry(const QRect &rect) +void XdgShellClient::requestGeometry(const QRect &rect) { if (m_requestGeometryBlockCounter != 0) { m_blockedRequestGeometry = rect; @@ -1164,7 +1164,7 @@ void ShellClient::requestGeometry(const QRect &rect) m_blockedRequestGeometry = QRect(); } -void ShellClient::updatePendingGeometry() +void XdgShellClient::updatePendingGeometry() { QPoint position = pos(); MaximizeMode maximizeMode = m_maximizeMode; @@ -1189,12 +1189,12 @@ void ShellClient::updatePendingGeometry() updateMaximizeMode(maximizeMode); } -void ShellClient::clientFullScreenChanged(bool fullScreen) +void XdgShellClient::clientFullScreenChanged(bool fullScreen) { setFullScreen(fullScreen, false); } -void ShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force) +void XdgShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force) { Q_UNUSED(force) QRect area = workspace()->clientArea(WorkArea, this); @@ -1210,7 +1210,7 @@ void ShellClient::resizeWithChecks(int w, int h, ForceGeometry_t force) } } -void ShellClient::unmap() +void XdgShellClient::unmap() { m_unmapped = true; if (isMoveResize()) { @@ -1225,7 +1225,7 @@ void ShellClient::unmap() emit windowHidden(this); } -void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface) +void XdgShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface) { m_plasmaShellSurface = surface; auto updatePosition = [this, surface] { @@ -1291,7 +1291,7 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface updatePosition(); updateRole(); updateShowOnScreenEdge(); - connect(this, &ShellClient::geometryChanged, this, &ShellClient::updateShowOnScreenEdge); + connect(this, &XdgShellClient::geometryChanged, this, &XdgShellClient::updateShowOnScreenEdge); setSkipTaskbar(surface->skipTaskbar()); connect(surface, &PlasmaShellSurfaceInterface::skipTaskbarChanged, this, [this] { @@ -1304,7 +1304,7 @@ void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface }); } -void ShellClient::updateShowOnScreenEdge() +void XdgShellClient::updateShowOnScreenEdge() { if (!ScreenEdges::self()) { return; @@ -1378,7 +1378,7 @@ void ShellClient::updateShowOnScreenEdge() } } -bool ShellClient::isInitialPositionSet() const +bool XdgShellClient::isInitialPositionSet() const { if (m_plasmaShellSurface) { return m_plasmaShellSurface->isPositionSet(); @@ -1386,7 +1386,7 @@ bool ShellClient::isInitialPositionSet() const return false; } -void ShellClient::installAppMenu(AppMenuInterface *menu) +void XdgShellClient::installAppMenu(AppMenuInterface *menu) { m_appMenuInterface = menu; @@ -1400,7 +1400,7 @@ void ShellClient::installAppMenu(AppMenuInterface *menu) updateMenu(menu->address()); } -void ShellClient::installPalette(ServerSideDecorationPaletteInterface *palette) +void XdgShellClient::installPalette(ServerSideDecorationPaletteInterface *palette) { m_paletteInterface = palette; @@ -1416,7 +1416,7 @@ void ShellClient::installPalette(ServerSideDecorationPaletteInterface *palette) updatePalette(palette->palette()); } -void ShellClient::updateColorScheme() +void XdgShellClient::updateColorScheme() { if (m_paletteInterface) { AbstractClient::updateColorScheme(rules()->checkDecoColor(m_paletteInterface->palette())); @@ -1425,7 +1425,7 @@ void ShellClient::updateColorScheme() } } -void ShellClient::updateMaximizeMode(MaximizeMode maximizeMode) +void XdgShellClient::updateMaximizeMode(MaximizeMode maximizeMode) { if (maximizeMode == m_maximizeMode) { return; @@ -1438,7 +1438,7 @@ void ShellClient::updateMaximizeMode(MaximizeMode maximizeMode) emit clientMaximizedStateChanged(this, m_maximizeMode & MaximizeHorizontal, m_maximizeMode & MaximizeVertical); } -bool ShellClient::hasStrut() const +bool XdgShellClient::hasStrut() const { if (!isShown(true)) { return false; @@ -1452,7 +1452,7 @@ bool ShellClient::hasStrut() const return m_plasmaShellSurface->panelBehavior() == PlasmaShellSurfaceInterface::PanelBehavior::AlwaysVisible; } -void ShellClient::updateIcon() +void XdgShellClient::updateIcon() { const QString waylandIconName = QStringLiteral("wayland"); const QString dfIconName = iconFromDesktopFile(); @@ -1463,12 +1463,12 @@ void ShellClient::updateIcon() setIcon(QIcon::fromTheme(iconName)); } -bool ShellClient::isTransient() const +bool XdgShellClient::isTransient() const { return m_transient; } -void ShellClient::setTransient() +void XdgShellClient::setTransient() { SurfaceInterface *s = nullptr; if (m_xdgShellSurface) { @@ -1495,12 +1495,12 @@ void ShellClient::setTransient() m_transient = (s != nullptr); } -bool ShellClient::hasTransientPlacementHint() const +bool XdgShellClient::hasTransientPlacementHint() const { return isTransient() && transientFor() && m_xdgShellPopup; } -QRect ShellClient::transientPlacement(const QRect &bounds) const +QRect XdgShellClient::transientPlacement(const QRect &bounds) const { QRect anchorRect; Qt::Edges anchorEdge; @@ -1620,7 +1620,7 @@ QRect ShellClient::transientPlacement(const QRect &bounds) const return popupPosition; } -QPoint ShellClient::popupOffset(const QRect &anchorRect, const Qt::Edges anchorEdge, const Qt::Edges gravity, const QSize popupSize) const +QPoint XdgShellClient::popupOffset(const QRect &anchorRect, const Qt::Edges anchorEdge, const Qt::Edges gravity, const QSize popupSize) const { QPoint anchorPoint; switch (anchorEdge & (Qt::LeftEdge | Qt::RightEdge)) { @@ -1672,19 +1672,19 @@ QPoint ShellClient::popupOffset(const QRect &anchorRect, const Qt::Edges anchorE return anchorPoint + popupPosAdjust; } -void ShellClient::doResizeSync() +void XdgShellClient::doResizeSync() { requestGeometry(moveResizeGeometry()); } -QMatrix4x4 ShellClient::inputTransformation() const +QMatrix4x4 XdgShellClient::inputTransformation() const { QMatrix4x4 m = Toplevel::inputTransformation(); m.translate(-borderLeft(), -borderTop()); return m; } -void ShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecorationInterface *deco) +void XdgShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecorationInterface *deco) { if (m_serverDecoration == deco) { return; @@ -1697,7 +1697,7 @@ void ShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecora return; } if (!m_unmapped) { - // maybe delay to next event cycle in case the ShellClient is getting destroyed, too + // maybe delay to next event cycle in case the XdgShellClient is getting destroyed, too updateDecoration(true); } } @@ -1715,7 +1715,7 @@ void ShellClient::installServerSideDecoration(KWayland::Server::ServerSideDecora ); } -void ShellClient::installXdgDecoration(XdgDecorationInterface *deco) +void XdgShellClient::installXdgDecoration(XdgDecorationInterface *deco) { Q_ASSERT(m_xdgShellSurface); @@ -1738,7 +1738,7 @@ void ShellClient::installXdgDecoration(XdgDecorationInterface *deco) }); } -bool ShellClient::shouldExposeToWindowManagement() +bool XdgShellClient::shouldExposeToWindowManagement() { if (isLockScreen()) { return false; @@ -1749,7 +1749,7 @@ bool ShellClient::shouldExposeToWindowManagement() return true; } -KWayland::Server::XdgShellSurfaceInterface::States ShellClient::xdgSurfaceStates() const +KWayland::Server::XdgShellSurfaceInterface::States XdgShellClient::xdgSurfaceStates() const { XdgShellSurfaceInterface::States states; if (isActive()) { @@ -1767,7 +1767,7 @@ KWayland::Server::XdgShellSurfaceInterface::States ShellClient::xdgSurfaceStates return states; } -void ShellClient::doMinimize() +void XdgShellClient::doMinimize() { if (isMinimized()) { workspace()->clientHidden(this); @@ -1777,13 +1777,13 @@ void ShellClient::doMinimize() workspace()->updateMinimizedOfTransients(this); } -void ShellClient::placeIn(const QRect &area) +void XdgShellClient::placeIn(const QRect &area) { Placement::self()->place(this, area); setGeometryRestore(geometry()); } -void ShellClient::showOnScreenEdge() +void XdgShellClient::showOnScreenEdge() { if (!m_plasmaShellSurface || m_unmapped) { return; @@ -1795,7 +1795,7 @@ void ShellClient::showOnScreenEdge() } } -bool ShellClient::dockWantsInput() const +bool XdgShellClient::dockWantsInput() const { if (m_plasmaShellSurface) { if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Panel) { @@ -1805,7 +1805,7 @@ bool ShellClient::dockWantsInput() const return false; } -void ShellClient::killWindow() +void XdgShellClient::killWindow() { if (!surface()) { return; @@ -1820,19 +1820,19 @@ void ShellClient::killWindow() QTimer::singleShot(5000, c, &ClientConnection::destroy); } -bool ShellClient::hasPopupGrab() const +bool XdgShellClient::hasPopupGrab() const { return m_hasPopupGrab; } -void ShellClient::popupDone() +void XdgShellClient::popupDone() { if (m_xdgShellPopup) { m_xdgShellPopup->popupDone(); } } -void ShellClient::updateClientOutputs() +void XdgShellClient::updateClientOutputs() { QVector clientOutputs; const auto outputs = waylandServer()->display()->outputs(); @@ -1845,7 +1845,7 @@ void ShellClient::updateClientOutputs() surface()->setOutputs(clientOutputs); } -void ShellClient::updateWindowMargins() +void XdgShellClient::updateWindowMargins() { QRect windowGeometry; QSize clientSize = m_clientSize; @@ -1871,7 +1871,7 @@ void ShellClient::updateWindowMargins() } } -bool ShellClient::isPopupWindow() const +bool XdgShellClient::isPopupWindow() const { if (Toplevel::isPopupWindow()) { return true; @@ -1882,7 +1882,7 @@ bool ShellClient::isPopupWindow() const return false; } -bool ShellClient::supportsWindowRules() const +bool XdgShellClient::supportsWindowRules() const { if (m_plasmaShellSurface) { return false; diff --git a/shell_client.h b/xdgshellclient.h similarity index 96% rename from shell_client.h rename to xdgshellclient.h index 822f3a9332..ed09c7a420 100644 --- a/shell_client.h +++ b/xdgshellclient.h @@ -48,13 +48,13 @@ enum class PingReason { FocusWindow }; -class KWIN_EXPORT ShellClient : public AbstractClient +class KWIN_EXPORT XdgShellClient : public AbstractClient { Q_OBJECT public: - ShellClient(KWayland::Server::XdgShellSurfaceInterface *surface); - ShellClient(KWayland::Server::XdgShellPopupInterface *surface); - ~ShellClient() override; + XdgShellClient(KWayland::Server::XdgShellSurfaceInterface *surface); + XdgShellClient(KWayland::Server::XdgShellPopupInterface *surface); + ~XdgShellClient() override; QStringList activities() const override; QPoint clientContentPos() const override; @@ -206,7 +206,7 @@ private: void doSetGeometry(const QRect &rect); void unmap(); void markAsMapped(); - static void deleteClient(ShellClient *c); + static void deleteClient(XdgShellClient *c); QSize toWindowGeometry(const QSize &geometry) const; @@ -255,7 +255,7 @@ private: class RequestGeometryBlocker { //TODO rename ConfigureBlocker when this class is Xdg only public: - RequestGeometryBlocker(ShellClient *client) + RequestGeometryBlocker(XdgShellClient *client) : m_client(client) { m_client->m_requestGeometryBlockCounter++; @@ -268,7 +268,7 @@ private: } } private: - ShellClient *m_client; + XdgShellClient *m_client; }; friend class RequestGeometryBlocker; int m_requestGeometryBlockCounter = 0; @@ -286,6 +286,6 @@ private: } -Q_DECLARE_METATYPE(KWin::ShellClient*) +Q_DECLARE_METATYPE(KWin::XdgShellClient *) #endif