diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,7 +475,6 @@ scripting/timer.cpp scripting/workspace_wrapper.cpp shadow.cpp - shell_client.cpp sm.cpp thumbnailitem.cpp toplevel.cpp @@ -496,6 +495,7 @@ 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 --- a/autotests/integration/CMakeLists.txt +++ b/autotests/integration/CMakeLists.txt @@ -33,7 +33,7 @@ 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 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 --- a/autotests/integration/activation_test.cpp +++ b/autotests/integration/activation_test.cpp @@ -23,9 +23,9 @@ #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 @@ void ActivationTest::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -101,13 +101,13 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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,29 +374,29 @@ // 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); QVERIFY(geometryChangedSpy1.wait()); 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 @@ // 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,29 +459,29 @@ // 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); QVERIFY(geometryChangedSpy1.wait()); 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 @@ // 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 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -27,7 +27,7 @@ #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 @@ 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 --- a/autotests/integration/buffer_size_change_test.cpp +++ b/autotests/integration/buffer_size_change_test.cpp @@ -20,7 +20,7 @@ #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 @@ 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 @@ // 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 @@ // 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 @@ 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 --- a/autotests/integration/dbus_interface_test.cpp +++ b/autotests/integration/dbus_interface_test.cpp @@ -27,7 +27,7 @@ #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 @@ 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,15 +112,15 @@ QVERIFY(windowData.empty()); } -void TestDbusInterface::testGetWindowInfoShellClient_data() +void TestDbusInterface::testGetWindowInfoXdgShellClient_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestDbusInterface::testGetWindowInfoShellClient() +void TestDbusInterface::testGetWindowInfoXdgShellClient() { QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); QVERIFY(clientAddedSpy.isValid()); @@ -135,7 +135,7 @@ 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 @@ // 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 --- a/autotests/integration/debug_console_test.cpp +++ b/autotests/integration/debug_console_test.cpp @@ -22,7 +22,7 @@ #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 @@ { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -393,7 +393,7 @@ 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 --- a/autotests/integration/decoration_input_test.cpp +++ b/autotests/integration/decoration_input_test.cpp @@ -26,7 +26,7 @@ #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 @@ { 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 --- a/autotests/integration/desktop_window_x11_test.cpp +++ b/autotests/integration/desktop_window_x11_test.cpp @@ -26,7 +26,7 @@ #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 @@ 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 --- a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp +++ b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp @@ -27,7 +27,7 @@ #include "wayland_server.h" #include "workspace.h" #include "scene.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -54,7 +54,7 @@ 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 --- a/autotests/integration/dont_crash_cancel_animation.cpp +++ b/autotests/integration/dont_crash_cancel_animation.cpp @@ -26,7 +26,7 @@ #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 @@ 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 --- a/autotests/integration/dont_crash_cursor_physical_size_empty.cpp +++ b/autotests/integration/dont_crash_cursor_physical_size_empty.cpp @@ -24,7 +24,7 @@ #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::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 --- a/autotests/integration/dont_crash_empty_deco.cpp +++ b/autotests/integration/dont_crash_empty_deco.cpp @@ -27,7 +27,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -50,7 +50,7 @@ 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 --- a/autotests/integration/dont_crash_no_border.cpp +++ b/autotests/integration/dont_crash_no_border.cpp @@ -28,7 +28,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -56,7 +56,7 @@ 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 --- a/autotests/integration/dont_crash_reinitialize_compositor.cpp +++ b/autotests/integration/dont_crash_reinitialize_compositor.cpp @@ -27,7 +27,7 @@ #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 @@ qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -134,7 +134,7 @@ 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 @@ 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 --- a/autotests/integration/dont_crash_useractions_menu.cpp +++ b/autotests/integration/dont_crash_useractions_menu.cpp @@ -22,7 +22,7 @@ #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 @@ 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 --- a/autotests/integration/effects/desktop_switching_animation_test.cpp +++ b/autotests/integration/effects/desktop_switching_animation_test.cpp @@ -26,7 +26,7 @@ #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 @@ 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 @@ 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 --- a/autotests/integration/effects/fade_test.cpp +++ b/autotests/integration/effects/fade_test.cpp @@ -23,7 +23,7 @@ #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 @@ 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 --- a/autotests/integration/effects/maximize_animation_test.cpp +++ b/autotests/integration/effects/maximize_animation_test.cpp @@ -26,7 +26,7 @@ #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 @@ 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 @@ // 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 @@ 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 --- a/autotests/integration/effects/minimize_animation_test.cpp +++ b/autotests/integration/effects/minimize_animation_test.cpp @@ -26,7 +26,7 @@ #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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/effects/popup_open_close_animation_test.cpp +++ b/autotests/integration/effects/popup_open_close_animation_test.cpp @@ -26,7 +26,7 @@ #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 @@ qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -119,7 +119,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/effects/scripted_effects_test.cpp +++ b/autotests/integration/effects/scripted_effects_test.cpp @@ -29,7 +29,7 @@ #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 @@ void ScriptedEffectsTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); @@ -511,7 +511,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/effects/slidingpopups_test.cpp +++ b/autotests/integration/effects/slidingpopups_test.cpp @@ -26,7 +26,7 @@ #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 @@ 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 --- a/autotests/integration/effects/toplevel_open_close_animation_test.cpp +++ b/autotests/integration/effects/toplevel_open_close_animation_test.cpp @@ -27,7 +27,7 @@ #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 @@ qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); kwinApp()->platform()->setInitialWindowSize(QSize(1280, 1024)); @@ -137,16 +137,16 @@ 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()); // Eventually, the animation will be complete. QTRY_VERIFY(!effect->isActive()); // 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 @@ 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 @@ 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 --- a/autotests/integration/effects/translucency_test.cpp +++ b/autotests/integration/effects/translucency_test.cpp @@ -24,7 +24,7 @@ #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 @@ 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 --- a/autotests/integration/effects/windowgeometry_test.cpp +++ b/autotests/integration/effects/windowgeometry_test.cpp @@ -23,7 +23,7 @@ #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 @@ 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 --- a/autotests/integration/effects/wobbly_shade_test.cpp +++ b/autotests/integration/effects/wobbly_shade_test.cpp @@ -25,7 +25,7 @@ #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 @@ 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 --- a/autotests/integration/generic_scene_opengl_test.cpp +++ b/autotests/integration/generic_scene_opengl_test.cpp @@ -23,7 +23,7 @@ #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::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 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -24,7 +24,7 @@ #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 @@ { 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 --- a/autotests/integration/idle_inhibition_test.cpp +++ b/autotests/integration/idle_inhibition_test.cpp @@ -19,7 +19,7 @@ *********************************************************************/ #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 @@ void TestIdleInhibition::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -268,7 +268,7 @@ 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 @@ 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 --- a/autotests/integration/input_stacking_order.cpp +++ b/autotests/integration/input_stacking_order.cpp @@ -26,7 +26,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -61,7 +61,7 @@ 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 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -23,7 +23,7 @@ #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 @@ { 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 --- a/autotests/integration/keyboard_layout_test.cpp +++ b/autotests/integration/keyboard_layout_test.cpp @@ -21,7 +21,7 @@ #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::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 --- a/autotests/integration/keymap_creation_failure_test.cpp +++ b/autotests/integration/keymap_creation_failure_test.cpp @@ -21,7 +21,7 @@ #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 @@ 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 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -58,7 +58,7 @@ } class AbstractClient; -class ShellClient; +class XdgShellClient; class WaylandTestApplication : public ApplicationWaylandAbstract { @@ -181,15 +181,15 @@ 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 --- a/autotests/integration/kwinbindings_test.cpp +++ b/autotests/integration/kwinbindings_test.cpp @@ -22,7 +22,7 @@ #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 @@ 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 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -27,7 +27,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -183,7 +183,7 @@ 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 --- a/autotests/integration/maximize_test.cpp +++ b/autotests/integration/maximize_test.cpp @@ -22,7 +22,7 @@ #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 @@ void TestMaximized::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -103,7 +103,7 @@ 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 @@ // 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 @@ // 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 @@ 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 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -28,7 +28,7 @@ #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 @@ { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType("MaximizeMode"); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -321,7 +321,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/placement_test.cpp +++ b/autotests/integration/placement_test.cpp @@ -22,7 +22,7 @@ #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::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -215,7 +215,7 @@ 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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/plasma_surface_test.cpp +++ b/autotests/integration/plasma_surface_test.cpp @@ -20,7 +20,7 @@ #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 @@ 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() { - // 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 --- a/autotests/integration/plasmawindow_test.cpp +++ b/autotests/integration/plasmawindow_test.cpp @@ -25,7 +25,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -68,7 +68,7 @@ void PlasmaWindowTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -245,7 +245,7 @@ // 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 @@ 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 @@ 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 --- a/autotests/integration/pointer_constraints_test.cpp +++ b/autotests/integration/pointer_constraints_test.cpp @@ -22,7 +22,7 @@ #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 @@ 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 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -30,7 +30,7 @@ #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 @@ void PointerInputTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -1209,7 +1209,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -27,7 +27,7 @@ #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 @@ 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 --- a/autotests/integration/scene_opengl_shadow_test.cpp +++ b/autotests/integration/scene_opengl_shadow_test.cpp @@ -44,7 +44,7 @@ #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 @@ { // 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 --- a/autotests/integration/scene_qpainter_shadow_test.cpp +++ b/autotests/integration/scene_qpainter_shadow_test.cpp @@ -49,7 +49,7 @@ #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 @@ { // 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 --- a/autotests/integration/scene_qpainter_test.cpp +++ b/autotests/integration/scene_qpainter_test.cpp @@ -24,7 +24,7 @@ #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::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 --- a/autotests/integration/screenedge_client_show_test.cpp +++ b/autotests/integration/screenedge_client_show_test.cpp @@ -26,7 +26,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -51,7 +51,7 @@ 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 --- a/autotests/integration/shade_test.cpp +++ b/autotests/integration/shade_test.cpp @@ -25,7 +25,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -49,7 +49,7 @@ 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 --- a/autotests/integration/showing_desktop_test.cpp +++ b/autotests/integration/showing_desktop_test.cpp @@ -19,7 +19,7 @@ *********************************************************************/ #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 @@ 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 --- a/autotests/integration/stacking_order_test.cpp +++ b/autotests/integration/stacking_order_test.cpp @@ -26,7 +26,7 @@ #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 @@ { qRegisterMetaType(); qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -102,7 +102,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/struts_test.cpp +++ b/autotests/integration/struts_test.cpp @@ -26,7 +26,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -67,7 +67,7 @@ void StrutsTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -168,7 +168,7 @@ 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 @@ 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 --- a/autotests/integration/tabbox_test.cpp +++ b/autotests/integration/tabbox_test.cpp @@ -22,7 +22,7 @@ #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 @@ 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 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -18,7 +18,7 @@ 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,19 +392,19 @@ surface->commit(Surface::CommitFlag::None); } -ShellClient *waitForWaylandWindowShown(int timeout) +XdgShellClient *waitForWaylandWindowShown(int timeout) { QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); if (!clientAddedSpy.isValid()) { return nullptr; } 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 @@ 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 --- a/autotests/integration/touch_input_test.cpp +++ b/autotests/integration/touch_input_test.cpp @@ -20,7 +20,7 @@ #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 @@ 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 --- a/autotests/integration/transient_placement.cpp +++ b/autotests/integration/transient_placement.cpp @@ -25,7 +25,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -63,7 +63,7 @@ void TransientPlacementTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -319,7 +319,7 @@ 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 --- a/autotests/integration/virtual_desktop_test.cpp +++ b/autotests/integration/virtual_desktop_test.cpp @@ -21,7 +21,7 @@ #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 @@ void VirtualDesktopTest::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); QVERIFY(workspaceCreatedSpy.isValid()); @@ -157,7 +157,7 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/window_rules_test.cpp +++ b/autotests/integration/window_rules_test.cpp @@ -28,7 +28,7 @@ #include "rules.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include @@ -52,7 +52,7 @@ 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 --- a/autotests/integration/window_selection_test.cpp +++ b/autotests/integration/window_selection_test.cpp @@ -22,7 +22,7 @@ #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 @@ 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 --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -27,7 +27,7 @@ #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 @@ 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 rename from autotests/integration/shell_client_rules_test.cpp rename to autotests/integration/xdgshellclient_rules_test.cpp --- a/autotests/integration/shell_client_rules_test.cpp +++ b/autotests/integration/xdgshellclient_rules_test.cpp @@ -25,7 +25,7 @@ #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 @@ 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 @@ void testMatchAfterNameChange(); }; -void TestShellClientRules::initTestCase() +void TestXdgShellClientRules::initTestCase() { - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); QSignalSpy workspaceCreatedSpy(kwinApp(), &Application::workspaceCreated); @@ -241,15 +241,15 @@ waylandServer()->initWorkspace(); } -void TestShellClientRules::init() +void TestXdgShellClientRules::init() { VirtualDesktopManager::self()->setCurrent(VirtualDesktopManager::self()->desktops().first()); QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); screens()->setCurrent(0); } -void TestShellClientRules::cleanup() +void TestXdgShellClientRules::cleanup() { Test::destroyWaylandConnection(); @@ -263,14 +263,14 @@ } #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 @@ // 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ TEST_DATA(testSizeApplyNow) -void TestShellClientRules::testSizeApplyNow() +void TestXdgShellClientRules::testSizeApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); @@ -1125,7 +1125,7 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ TEST_DATA(testMaximizeApplyNow) -void TestShellClientRules::testMaximizeApplyNow() +void TestXdgShellClientRules::testMaximizeApplyNow() { // Create the test client. QFETCH(Test::XdgShellSurfaceType, type); @@ -1674,7 +1674,7 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ TEST_DATA(testShortcutForce) -void TestShellClientRules::testShortcutForce() +void TestXdgShellClientRules::testShortcutForce() { QSKIP("KWin core can't release forced window shortcuts"); @@ -4019,7 +4019,7 @@ // 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 @@ 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 @@ TEST_DATA(testShortcutForceTemporarily) -void TestShellClientRules::testShortcutForceTemporarily() +void TestXdgShellClientRules::testShortcutForceTemporarily() { QSKIP("KWin core can't release forced window shortcuts"); @@ -4158,7 +4158,7 @@ // 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ // 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 @@ 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 @@ 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 rename from autotests/integration/shell_client_test.cpp rename to autotests/integration/xdgshellclient_test.cpp --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/xdgshellclient_test.cpp @@ -25,7 +25,7 @@ #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 @@ 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 @@ void testXdgWindowGeometry(); }; -void TestShellClient::initTestCase() +void TestXdgShellClient::initTestCase() { qRegisterMetaType(); - qRegisterMetaType(); + qRegisterMetaType(); qRegisterMetaType(); qRegisterMetaType(); @@ -137,7 +137,7 @@ waylandServer()->initWorkspace(); } -void TestShellClient::init() +void TestXdgShellClient::init() { QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration | Test::AdditionalWaylandInterface::XdgDecoration | @@ -147,20 +147,20 @@ 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"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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 @@ 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 @@ 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 @@ 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,16 +258,16 @@ 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()); QScopedPointer shellSurface(Test::createXdgShellStableSurface(surface.data())); auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); 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 @@ 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 @@ 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,22 +321,22 @@ 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"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testWindowOutputs() +void TestXdgShellClient::testWindowOutputs() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -374,15 +374,15 @@ QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280,0)); } -void TestShellClient::testMinimizeActiveWindow_data() +void TestXdgShellClient::testMinimizeActiveWindow_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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 @@ QCOMPARE(workspace()->activeClient(), c); } -void TestShellClient::testFullscreen_data() +void TestXdgShellClient::testFullscreen_data() { QTest::addColumn("type"); QTest::addColumn("decoMode"); @@ -426,7 +426,7 @@ 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 @@ 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,15 +492,15 @@ QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); } -void TestShellClient::testFullscreenRestore_data() +void TestXdgShellClient::testFullscreenRestore_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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 @@ 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,15 +553,15 @@ QCOMPARE(c->geometry().size(), QSize(100, 50)); } -void TestShellClient::testUserCanSetFullscreen_data() +void TestXdgShellClient::testUserCanSetFullscreen_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testUserCanSetFullscreen() +void TestXdgShellClient::testUserCanSetFullscreen() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -573,15 +573,15 @@ QVERIFY(c->userCanSetFullScreen()); } -void TestShellClient::testUserSetFullscreen_data() +void TestXdgShellClient::testUserSetFullscreen_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testUserSetFullscreen() +void TestXdgShellClient::testUserSetFullscreen() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -635,7 +635,7 @@ QVERIFY(!c->isFullScreen()); } -void TestShellClient::testMaximizedToFullscreen_data() +void TestXdgShellClient::testMaximizedToFullscreen_data() { QTest::addColumn("type"); QTest::addColumn("decoMode"); @@ -647,7 +647,7 @@ 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 @@ 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,15 +728,15 @@ QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); } -void TestShellClient::testWindowOpensLargerThanScreen_data() +void TestXdgShellClient::testWindowOpensLargerThanScreen_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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,15 +764,15 @@ QVERIFY(sizeChangeRequestedSpy.wait(10)); } -void TestShellClient::testHidden_data() +void TestXdgShellClient::testHidden_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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 @@ //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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ //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,15 +986,15 @@ QVERIFY(elapsed2 > 1800); //second ping comes in a second later } -void TestShellClient::testX11WindowId_data() +void TestXdgShellClient::testX11WindowId_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; } -void TestShellClient::testX11WindowId() +void TestXdgShellClient::testX11WindowId() { QScopedPointer surface(Test::createSurface()); QFETCH(Test::XdgShellSurfaceType, type); @@ -1005,7 +1005,7 @@ 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 @@ 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,15 +1025,15 @@ QVERIFY (QDBusConnection::sessionBus().unregisterService("org.kde.kappmenu")); } -void TestShellClient::testNoDecorationModeRequested_data() +void TestXdgShellClient::testNoDecorationModeRequested_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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,15 +1053,15 @@ QCOMPARE(c->isDecorated(), true); } -void TestShellClient::testSendClientWithTransientToDesktop_data() +void TestXdgShellClient::testSendClientWithTransientToDesktop_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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,15 +1108,15 @@ QCOMPARE(transient->desktop(), 1); } -void TestShellClient::testMinimizeWindowWithTransients_data() +void TestXdgShellClient::testMinimizeWindowWithTransients_data() { QTest::addColumn("type"); QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; 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,16 +1150,16 @@ QVERIFY(!transient->isMinimized()); } -void TestShellClient::testXdgDecoration_data() +void TestXdgShellClient::testXdgDecoration_data() { QTest::addColumn("requestedMode"); QTest::addColumn("expectedMode"); QTest::newRow("client side requested") << XdgDecoration::Mode::ClientSide << XdgDecoration::Mode::ClientSide; 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 --- a/autotests/integration/xwayland_input_test.cpp +++ b/autotests/integration/xwayland_input_test.cpp @@ -26,7 +26,7 @@ #include "screens.h" #include "wayland_server.h" #include "workspace.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include @@ -51,7 +51,7 @@ 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 --- a/autotests/integration/xwayland_selections_test.cpp +++ b/autotests/integration/xwayland_selections_test.cpp @@ -20,7 +20,7 @@ *********************************************************************/ #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 @@ 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 --- a/composite.cpp +++ b/composite.cpp @@ -30,7 +30,7 @@ #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 @@ 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 @@ } 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 @@ } 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.h b/debug_console.h --- a/debug_console.h +++ b/debug_console.h @@ -41,7 +41,7 @@ class Client; class InternalClient; -class ShellClient; +class XdgShellClient; class Unmanaged; class DebugConsoleFilter; @@ -73,13 +73,13 @@ 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/debug_console.cpp b/debug_console.cpp --- a/debug_console.cpp +++ b/debug_console.cpp @@ -24,7 +24,7 @@ #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 @@ } // 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 @@ 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 @@ 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 @@ } 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/deleted.cpp b/deleted.cpp --- a/deleted.cpp +++ b/deleted.cpp @@ -25,7 +25,7 @@ #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 @@ }); } - 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.h b/effects.h --- a/effects.h +++ b/effects.h @@ -291,7 +291,7 @@ 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/effects.cpp b/effects.cpp --- a/effects.cpp +++ b/effects.cpp @@ -55,7 +55,7 @@ #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 @@ } 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 @@ 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 @@ 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(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 @@ // 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/geometry.cpp b/geometry.cpp --- a/geometry.cpp +++ b/geometry.cpp @@ -45,7 +45,7 @@ #include #include "outline.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "wayland_server.h" #include @@ -201,7 +201,7 @@ } } 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.h b/idle_inhibition.h --- a/idle_inhibition.h +++ b/idle_inhibition.h @@ -37,16 +37,16 @@ namespace KWin { class AbstractClient; -class ShellClient; +class XdgShellClient; class IdleInhibition : public QObject { Q_OBJECT 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/idle_inhibition.cpp b/idle_inhibition.cpp --- a/idle_inhibition.cpp +++ b/idle_inhibition.cpp @@ -20,7 +20,7 @@ *********************************************************************/ #include "idle_inhibition.h" #include "deleted.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include "workspace.h" #include @@ -44,19 +44,19 @@ 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/input.cpp b/input.cpp --- a/input.cpp +++ b/input.cpp @@ -43,7 +43,7 @@ #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 --- a/layers.cpp +++ b/layers.cpp @@ -93,7 +93,7 @@ #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 --- a/plugins/platforms/drm/egl_stream_backend.h +++ b/plugins/platforms/drm/egl_stream_backend.h @@ -30,7 +30,7 @@ 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 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -27,7 +27,7 @@ #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.h b/popup_input_filter.h --- 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/popup_input_filter.cpp b/popup_input_filter.cpp --- 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/scripting/scripting_model.cpp b/scripting/scripting_model.cpp --- a/scripting/scripting_model.cpp +++ b/scripting/scripting_model.cpp @@ -25,7 +25,7 @@ #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 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -23,7 +23,7 @@ #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 --- a/thumbnailitem.cpp +++ b/thumbnailitem.cpp @@ -24,7 +24,7 @@ #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 --- a/useractions.cpp +++ b/useractions.cpp @@ -43,7 +43,7 @@ #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 --- a/virtualkeyboard.cpp +++ b/virtualkeyboard.cpp @@ -26,7 +26,7 @@ #include "wayland_server.h" #include "workspace.h" #include "xkb.h" -#include "shell_client.h" +#include "xdgshellclient.h" #include #include diff --git a/wayland_server.h b/wayland_server.h --- a/wayland_server.h +++ b/wayland_server.h @@ -72,7 +72,7 @@ namespace KWin { -class ShellClient; +class XdgShellClient; class AbstractClient; class Toplevel; @@ -119,12 +119,12 @@ 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 @@ 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 @@ } 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/wayland_server.cpp b/wayland_server.cpp --- a/wayland_server.cpp +++ b/wayland_server.cpp @@ -23,7 +23,7 @@ #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 @@ 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 @@ 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 @@ 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 @@ 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,16 +362,16 @@ 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); } } ); m_paletteManager = m_display->createServerSideDecorationPaletteManager(m_display); 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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/workspace.h b/workspace.h --- a/workspace.h +++ b/workspace.h @@ -133,7 +133,7 @@ * @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/workspace.cpp b/workspace.cpp --- a/workspace.cpp +++ b/workspace.cpp @@ -56,7 +56,7 @@ #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 @@ 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 @@ 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 @@ } } ); - connect(c, &ShellClient::windowHidden, this, + connect(c, &XdgShellClient::windowHidden, this, [this] { // TODO: update tabbox if it's displayed markXStackingOrderAsDirty(); @@ -353,7 +353,7 @@ } ); 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 @@ 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/shell_client.h b/xdgshellclient.h rename from shell_client.h rename to xdgshellclient.h --- a/shell_client.h +++ b/xdgshellclient.h @@ -48,13 +48,13 @@ 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 @@ 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 @@ 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: - ShellClient *m_client; + XdgShellClient *m_client; }; friend class RequestGeometryBlocker; int m_requestGeometryBlockCounter = 0; @@ -286,6 +286,6 @@ } -Q_DECLARE_METATYPE(KWin::ShellClient*) +Q_DECLARE_METATYPE(KWin::XdgShellClient *) #endif diff --git a/shell_client.cpp b/xdgshellclient.cpp rename from shell_client.cpp rename to xdgshellclient.cpp --- a/shell_client.cpp +++ b/xdgshellclient.cpp @@ -19,7 +19,7 @@ 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,37 +66,37 @@ namespace KWin { -ShellClient::ShellClient(XdgShellSurfaceInterface *surface) +XdgShellClient::XdgShellClient(XdgShellSurfaceInterface *surface) : AbstractClient() , m_xdgShellSurface(surface) , m_xdgShellPopup(nullptr) { 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) { 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 @@ } ); // 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 @@ 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 @@ 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 @@ 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 @@ m_isInitialized = true; } -void ShellClient::destroyClient() +void XdgShellClient::destroyClient() { m_closing = true; #ifdef KWIN_BUILD_TABBOX @@ -416,12 +416,12 @@ 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,44 +431,44 @@ 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(); } return false; } ); } -Layer ShellClient::layerForDock() const +Layer XdgShellClient::layerForDock() const { if (m_plasmaShellSurface) { switch (m_plasmaShellSurface->panelBehavior()) { @@ -487,26 +487,26 @@ 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) Q_UNUSED(supported_types) 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 @@ 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 @@ Toplevel::addDamage(damage); } -void ShellClient::markAsMapped() +void XdgShellClient::markAsMapped() { if (!m_unmapped) { return; @@ -551,7 +551,7 @@ 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 @@ 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 @@ 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::doSetGeometry(const QRect &rect) +void XdgShellClient::doSetGeometry(const QRect &rect) { if (geom == rect && pendingGeometryUpdate() == PendingGeometryNone) { return; @@ -672,12 +672,12 @@ } } -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 @@ 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,22 +712,22 @@ } } -void ShellClient::closeWindow() +void XdgShellClient::closeWindow() { if (m_xdgShellSurface && isCloseable()) { m_xdgShellSurface->close(); const qint32 pingSerial = static_cast(m_xdgShellSurface->global())->ping(m_xdgShellSurface); m_pingSerials.insert(pingSerial, PingReason::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 @@ 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,15 +754,15 @@ return true; } -bool ShellClient::isMinimizable() const +bool XdgShellClient::isMinimizable() const { if (!rules()->checkMinimize(true)) { return false; } 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 @@ return true; } -bool ShellClient::isMovableAcrossScreens() const +bool XdgShellClient::isMovableAcrossScreens() const { if (rules()->checkPosition(invalidPoint) != invalidPoint) { return false; @@ -790,7 +790,7 @@ return true; } -bool ShellClient::isResizable() const +bool XdgShellClient::isResizable() const { if (rules()->checkSize(QSize()).isValid()) { return false; @@ -804,13 +804,13 @@ 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 @@ } 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 @@ } } -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,15 +950,15 @@ return true; } -bool ShellClient::isFullScreenable() const +bool XdgShellClient::isFullScreenable() const { if (!rules()->checkFullScreen(true)) { return false; } return !isSpecialWindow(); } -void ShellClient::setFullScreen(bool set, bool user) +void XdgShellClient::setFullScreen(bool set, bool user) { set = rules()->checkFullScreen(set); @@ -1009,7 +1009,7 @@ emit fullScreenChanged(); } -void ShellClient::setNoBorder(bool set) +void XdgShellClient::setNoBorder(bool set) { if (!userCanSetNoBorder()) { return; @@ -1023,12 +1023,12 @@ 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,24 +1043,24 @@ } } -void ShellClient::doSetActive() +void XdgShellClient::doSetActive() { if (!isActive()) { return; } StackingUpdatesBlocker blocker(workspace()); workspace()->focusToNull(); } -bool ShellClient::userCanSetFullScreen() const +bool XdgShellClient::userCanSetFullScreen() const { if (m_xdgShellSurface) { return true; } 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 @@ 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 @@ 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 @@ m_blockedRequestGeometry = QRect(); } -void ShellClient::updatePendingGeometry() +void XdgShellClient::updatePendingGeometry() { QPoint position = pos(); MaximizeMode maximizeMode = m_maximizeMode; @@ -1189,12 +1189,12 @@ 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::unmap() +void XdgShellClient::unmap() { m_unmapped = true; if (isMoveResize()) { @@ -1225,7 +1225,7 @@ emit windowHidden(this); } -void ShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface) +void XdgShellClient::installPlasmaShellSurface(PlasmaShellSurfaceInterface *surface) { m_plasmaShellSurface = surface; auto updatePosition = [this, surface] { @@ -1291,7 +1291,7 @@ 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::updateShowOnScreenEdge() +void XdgShellClient::updateShowOnScreenEdge() { if (!ScreenEdges::self()) { return; @@ -1378,15 +1378,15 @@ } } -bool ShellClient::isInitialPositionSet() const +bool XdgShellClient::isInitialPositionSet() const { if (m_plasmaShellSurface) { return m_plasmaShellSurface->isPositionSet(); } return false; } -void ShellClient::installAppMenu(AppMenuInterface *menu) +void XdgShellClient::installAppMenu(AppMenuInterface *menu) { m_appMenuInterface = menu; @@ -1400,7 +1400,7 @@ updateMenu(menu->address()); } -void ShellClient::installPalette(ServerSideDecorationPaletteInterface *palette) +void XdgShellClient::installPalette(ServerSideDecorationPaletteInterface *palette) { m_paletteInterface = palette; @@ -1416,16 +1416,16 @@ updatePalette(palette->palette()); } -void ShellClient::updateColorScheme() +void XdgShellClient::updateColorScheme() { if (m_paletteInterface) { AbstractClient::updateColorScheme(rules()->checkDecoColor(m_paletteInterface->palette())); } else { AbstractClient::updateColorScheme(rules()->checkDecoColor(QString())); } } -void ShellClient::updateMaximizeMode(MaximizeMode maximizeMode) +void XdgShellClient::updateMaximizeMode(MaximizeMode maximizeMode) { if (maximizeMode == m_maximizeMode) { return; @@ -1438,7 +1438,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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::installXdgDecoration(XdgDecorationInterface *deco) +void XdgShellClient::installXdgDecoration(XdgDecorationInterface *deco) { Q_ASSERT(m_xdgShellSurface); @@ -1738,7 +1738,7 @@ }); } -bool ShellClient::shouldExposeToWindowManagement() +bool XdgShellClient::shouldExposeToWindowManagement() { if (isLockScreen()) { return false; @@ -1749,7 +1749,7 @@ 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 @@ return states; } -void ShellClient::doMinimize() +void XdgShellClient::doMinimize() { if (isMinimized()) { workspace()->clientHidden(this); @@ -1777,13 +1777,13 @@ 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 @@ } } -bool ShellClient::dockWantsInput() const +bool XdgShellClient::dockWantsInput() const { if (m_plasmaShellSurface) { if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Panel) { @@ -1805,7 +1805,7 @@ return false; } -void ShellClient::killWindow() +void XdgShellClient::killWindow() { if (!surface()) { return; @@ -1820,19 +1820,19 @@ 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 @@ surface()->setOutputs(clientOutputs); } -void ShellClient::updateWindowMargins() +void XdgShellClient::updateWindowMargins() { QRect windowGeometry; QSize clientSize = m_clientSize; @@ -1871,7 +1871,7 @@ } } -bool ShellClient::isPopupWindow() const +bool XdgShellClient::isPopupWindow() const { if (Toplevel::isPopupWindow()) { return true; @@ -1882,7 +1882,7 @@ return false; } -bool ShellClient::supportsWindowRules() const +bool XdgShellClient::supportsWindowRules() const { if (m_plasmaShellSurface) { return false;