From dc6dba231db19b63de83ce84a8e330f56136bcaf Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 24 Sep 2023 10:34:38 +0300 Subject: [PATCH] Port away from KWayland's server-decoration implementation --- .../effects/slidingpopups_test.cpp | 2 +- .../integration/effects/wobbly_shade_test.cpp | 2 +- .../integration/fractional_scaling_test.cpp | 1 - autotests/integration/kwin_wayland_test.h | 3 - autotests/integration/pointer_input.cpp | 3 +- autotests/integration/quick_tiling_test.cpp | 15 ++- autotests/integration/test_helpers.cpp | 18 ---- autotests/integration/transient_placement.cpp | 3 +- autotests/integration/xdgshellwindow_test.cpp | 1 - src/wayland/autotests/client/CMakeLists.txt | 2 + .../client/test_server_side_decoration.cpp | 100 ++++++++++++------ src/wayland/tests/xdgforeigntest.cpp | 11 -- 12 files changed, 78 insertions(+), 83 deletions(-) diff --git a/autotests/integration/effects/slidingpopups_test.cpp b/autotests/integration/effects/slidingpopups_test.cpp index 26d5e4b3e9..e739f6305e 100644 --- a/autotests/integration/effects/slidingpopups_test.cpp +++ b/autotests/integration/effects/slidingpopups_test.cpp @@ -79,7 +79,7 @@ void SlidingPopupsTest::initTestCase() void SlidingPopupsTest::init() { - QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); + QVERIFY(Test::setupWaylandConnection()); } void SlidingPopupsTest::cleanup() diff --git a/autotests/integration/effects/wobbly_shade_test.cpp b/autotests/integration/effects/wobbly_shade_test.cpp index 7db2571b03..09bfee152f 100644 --- a/autotests/integration/effects/wobbly_shade_test.cpp +++ b/autotests/integration/effects/wobbly_shade_test.cpp @@ -73,7 +73,7 @@ void WobblyWindowsShadeTest::initTestCase() void WobblyWindowsShadeTest::init() { - QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); + QVERIFY(Test::setupWaylandConnection()); } void WobblyWindowsShadeTest::cleanup() diff --git a/autotests/integration/fractional_scaling_test.cpp b/autotests/integration/fractional_scaling_test.cpp index 94cd4970d2..482fb97a1b 100644 --- a/autotests/integration/fractional_scaling_test.cpp +++ b/autotests/integration/fractional_scaling_test.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index 67ff050c6b..4293936acb 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -47,7 +47,6 @@ class PlasmaWindowManagement; class Pointer; class PointerConstraints; class Seat; -class ServerSideDecorationManager; class ShadowManager; class ShmPool; class SubCompositor; @@ -530,7 +529,6 @@ public: enum class AdditionalWaylandInterface { Seat = 1 << 0, - Decoration = 1 << 1, PlasmaShell = 1 << 2, WindowManagement = 1 << 3, PointerConstraints = 1 << 4, @@ -633,7 +631,6 @@ KWayland::Client::SubCompositor *waylandSubCompositor(); KWayland::Client::ShadowManager *waylandShadowManager(); KWayland::Client::ShmPool *waylandShmPool(); KWayland::Client::Seat *waylandSeat(); -KWayland::Client::ServerSideDecorationManager *waylandServerSideDecoration(); KWayland::Client::PlasmaShell *waylandPlasmaShell(); KWayland::Client::PlasmaWindowManagement *waylandWindowManagement(); KWayland::Client::PointerConstraints *waylandPointerConstraints(); diff --git a/autotests/integration/pointer_input.cpp b/autotests/integration/pointer_input.cpp index 2bc2f80109..6e44df3a65 100644 --- a/autotests/integration/pointer_input.cpp +++ b/autotests/integration/pointer_input.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -161,7 +160,7 @@ void PointerInputTest::initTestCase() void PointerInputTest::init() { - QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat | Test::AdditionalWaylandInterface::Decoration | Test::AdditionalWaylandInterface::XdgDecorationV1 | Test::AdditionalWaylandInterface::CursorShapeV1)); + QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat | Test::AdditionalWaylandInterface::XdgDecorationV1 | Test::AdditionalWaylandInterface::CursorShapeV1)); QVERIFY(Test::waitForWaylandPointer()); m_compositor = Test::waylandCompositor(); m_seat = Test::waylandSeat(); diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index d480d3a893..aa2579ab0d 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -111,7 +110,7 @@ void QuickTilingTest::initTestCase() void QuickTilingTest::init() { - QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration)); + QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::XdgDecorationV1)); m_connection = Test::waylandConnection(); m_compositor = Test::waylandCompositor(); @@ -452,17 +451,15 @@ void QuickTilingTest::testQuickTilingTouchMove() { // test verifies that touch on decoration also allows quick tiling // see BUG: 390113 - std::unique_ptr surface(Test::createSurface()); - QVERIFY(surface != nullptr); - std::unique_ptr deco(Test::waylandServerSideDecoration()->create(surface.get())); - std::unique_ptr shellSurface(Test::createXdgToplevelSurface(surface.get(), Test::CreationSetup::CreateOnly)); - QVERIFY(shellSurface != nullptr); + std::unique_ptr deco(Test::createXdgToplevelDecorationV1(shellSurface.get())); + + QSignalSpy decorationConfigureRequestedSpy(deco.get(), &Test::XdgToplevelDecorationV1::configureRequested); + QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested); + QSignalSpy toplevelConfigureRequestedSpy(shellSurface.get(), &Test::XdgToplevel::configureRequested); // wait for the initial configure event - QSignalSpy toplevelConfigureRequestedSpy(shellSurface.get(), &Test::XdgToplevel::configureRequested); - QSignalSpy surfaceConfigureRequestedSpy(shellSurface->xdgSurface(), &Test::XdgSurface::configureRequested); surface->commit(KWayland::Client::Surface::CommitFlag::None); QVERIFY(surfaceConfigureRequestedSpy.wait()); QCOMPARE(surfaceConfigureRequestedSpy.count(), 1); diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index d51af634c6..ad313502f2 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -271,7 +270,6 @@ static struct KWayland::Client::EventQueue *queue = nullptr; KWayland::Client::Compositor *compositor = nullptr; KWayland::Client::SubCompositor *subCompositor = nullptr; - KWayland::Client::ServerSideDecorationManager *decoration = nullptr; KWayland::Client::ShadowManager *shadowManager = nullptr; XdgShell *xdgShell = nullptr; KWayland::Client::ShmPool *shm = nullptr; @@ -535,13 +533,6 @@ bool setupWaylandConnection(AdditionalWaylandInterfaces flags) return false; } } - if (flags.testFlag(AdditionalWaylandInterface::Decoration)) { - s_waylandConnection.decoration = registry->createServerSideDecorationManager(registry->interface(KWayland::Client::Registry::Interface::ServerSideDecorationManager).name, - registry->interface(KWayland::Client::Registry::Interface::ServerSideDecorationManager).version); - if (!s_waylandConnection.decoration->isValid()) { - return false; - } - } if (flags.testFlag(AdditionalWaylandInterface::PlasmaShell)) { s_waylandConnection.plasmaShell = registry->createPlasmaShell(registry->interface(KWayland::Client::Registry::Interface::PlasmaShell).name, registry->interface(KWayland::Client::Registry::Interface::PlasmaShell).version); @@ -589,10 +580,6 @@ void destroyWaylandConnection() s_waylandConnection.windowManagement = nullptr; delete s_waylandConnection.plasmaShell; s_waylandConnection.plasmaShell = nullptr; - delete s_waylandConnection.decoration; - s_waylandConnection.decoration = nullptr; - delete s_waylandConnection.decoration; - s_waylandConnection.decoration = nullptr; delete s_waylandConnection.seat; s_waylandConnection.seat = nullptr; delete s_waylandConnection.pointerConstraints; @@ -675,11 +662,6 @@ KWayland::Client::Seat *waylandSeat() return s_waylandConnection.seat; } -KWayland::Client::ServerSideDecorationManager *waylandServerSideDecoration() -{ - return s_waylandConnection.decoration; -} - KWayland::Client::PlasmaShell *waylandPlasmaShell() { return s_waylandConnection.plasmaShell; diff --git a/autotests/integration/transient_placement.cpp b/autotests/integration/transient_placement.cpp index af0eb2b739..762addf1a3 100644 --- a/autotests/integration/transient_placement.cpp +++ b/autotests/integration/transient_placement.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -79,7 +78,7 @@ void TransientPlacementTest::initTestCase() void TransientPlacementTest::init() { - QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Decoration | Test::AdditionalWaylandInterface::LayerShellV1)); + QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::LayerShellV1)); workspace()->setActiveOutput(QPoint(640, 512)); input()->pointer()->warp(QPoint(640, 512)); diff --git a/autotests/integration/xdgshellwindow_test.cpp b/autotests/integration/xdgshellwindow_test.cpp index 8b22a72b9f..13169205d8 100644 --- a/autotests/integration/xdgshellwindow_test.cpp +++ b/autotests/integration/xdgshellwindow_test.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/src/wayland/autotests/client/CMakeLists.txt b/src/wayland/autotests/client/CMakeLists.txt index efd5836543..eaaac01fae 100644 --- a/src/wayland/autotests/client/CMakeLists.txt +++ b/src/wayland/autotests/client/CMakeLists.txt @@ -131,6 +131,8 @@ set( testServerSideDecoration_SRCS test_server_side_decoration.cpp ) add_executable(testServerSideDecoration ${testServerSideDecoration_SRCS}) +qt6_generate_wayland_protocol_client_sources(testServerSideDecoration FILES + ${PLASMA_WAYLAND_PROTOCOLS_DIR}/server-decoration.xml) target_link_libraries( testServerSideDecoration Qt::Test Qt::Gui KF6::WaylandClient kwin Wayland::Client) add_test(NAME kwayland-testServerSideDecoration COMMAND testServerSideDecoration) ecm_mark_as_test(testServerSideDecoration) diff --git a/src/wayland/autotests/client/test_server_side_decoration.cpp b/src/wayland/autotests/client/test_server_side_decoration.cpp index c1bdfec221..89b791f78e 100644 --- a/src/wayland/autotests/client/test_server_side_decoration.cpp +++ b/src/wayland/autotests/client/test_server_side_decoration.cpp @@ -11,13 +11,38 @@ #include "wayland/display.h" #include "wayland/server_decoration.h" +#include "qwayland-server-decoration.h" + #include "KWayland/Client/compositor.h" #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" #include "KWayland/Client/registry.h" -#include "KWayland/Client/server_decoration.h" #include "KWayland/Client/surface.h" +class ServerSideDecorationManager : public QtWayland::org_kde_kwin_server_decoration_manager +{ +}; + +class ServerSideDecoration : public QObject, public QtWayland::org_kde_kwin_server_decoration +{ + Q_OBJECT + +public: + ~ServerSideDecoration() override + { + release(); + } + +Q_SIGNALS: + void modeChanged(ServerSideDecorationManager::mode mode); + +protected: + void org_kde_kwin_server_decoration_mode(uint32_t mode) override + { + Q_EMIT modeChanged(ServerSideDecorationManager::mode(mode)); + } +}; + class TestServerSideDecoration : public QObject { Q_OBJECT @@ -42,7 +67,7 @@ private: KWayland::Client::ConnectionThread *m_connection = nullptr; KWayland::Client::Compositor *m_compositor = nullptr; KWayland::Client::EventQueue *m_queue = nullptr; - KWayland::Client::ServerSideDecorationManager *m_serverSideDecorationManager = nullptr; + ServerSideDecorationManager *m_serverSideDecorationManager = nullptr; QThread *m_thread = nullptr; KWayland::Client::Registry *m_registry = nullptr; }; @@ -80,9 +105,19 @@ void TestServerSideDecoration::init() m_queue->setup(m_connection); QVERIFY(m_queue->isValid()); + m_compositorInterface = new CompositorInterface(m_display, m_display); + m_serverSideDecorationManagerInterface = new ServerSideDecorationManagerInterface(m_display, m_display); + m_registry = new KWayland::Client::Registry(); + connect(m_registry, &KWayland::Client::Registry::interfaceAnnounced, this, [this](const QByteArray &interfaceName, quint32 name, quint32 version) { + if (interfaceName == org_kde_kwin_server_decoration_manager_interface.name) { + m_serverSideDecorationManager = new ServerSideDecorationManager(); + m_serverSideDecorationManager->init(*m_registry, name, version); + } + }); + + QSignalSpy interfacesAnnouncedSpy(m_registry, &KWayland::Client::Registry::interfacesAnnounced); QSignalSpy compositorSpy(m_registry, &KWayland::Client::Registry::compositorAnnounced); - QSignalSpy serverSideDecoManagerSpy(m_registry, &KWayland::Client::Registry::serverSideDecorationManagerAnnounced); QVERIFY(!m_registry->eventQueue()); m_registry->setEventQueue(m_queue); @@ -90,17 +125,12 @@ void TestServerSideDecoration::init() m_registry->create(m_connection); QVERIFY(m_registry->isValid()); m_registry->setup(); + QVERIFY(interfacesAnnouncedSpy.wait()); - m_compositorInterface = new CompositorInterface(m_display, m_display); - QVERIFY(compositorSpy.wait()); m_compositor = m_registry->createCompositor(compositorSpy.first().first().value(), compositorSpy.first().last().value(), this); - m_serverSideDecorationManagerInterface = new ServerSideDecorationManagerInterface(m_display, m_display); - - QVERIFY(serverSideDecoManagerSpy.wait()); - m_serverSideDecorationManager = m_registry->createServerSideDecorationManager(serverSideDecoManagerSpy.first().first().value(), - serverSideDecoManagerSpy.first().last().value(), - this); + QVERIFY(m_compositor); + QVERIFY(m_serverSideDecorationManager); } void TestServerSideDecoration::cleanup() @@ -138,11 +168,11 @@ void TestServerSideDecoration::testCreate_data() { using namespace KWin; QTest::addColumn("serverMode"); - QTest::addColumn("clientMode"); + QTest::addColumn("clientMode"); - QTest::newRow("none") << ServerSideDecorationManagerInterface::Mode::None << KWayland::Client::ServerSideDecoration::Mode::None; - QTest::newRow("client") << ServerSideDecorationManagerInterface::Mode::Client << KWayland::Client::ServerSideDecoration::Mode::Client; - QTest::newRow("server") << ServerSideDecorationManagerInterface::Mode::Server << KWayland::Client::ServerSideDecoration::Mode::Server; + QTest::newRow("none") << ServerSideDecorationManagerInterface::Mode::None << ServerSideDecorationManager::mode_None; + QTest::newRow("client") << ServerSideDecorationManagerInterface::Mode::Client << ServerSideDecorationManager::mode_Client; + QTest::newRow("server") << ServerSideDecorationManagerInterface::Mode::Server << ServerSideDecorationManager::mode_Server; } void TestServerSideDecoration::testCreate() @@ -162,9 +192,9 @@ void TestServerSideDecoration::testCreate() QVERIFY(!ServerSideDecorationInterface::get(serverSurface)); // create server side deco - std::unique_ptr serverSideDecoration(m_serverSideDecorationManager->create(surface.get())); - QCOMPARE(serverSideDecoration->mode(), KWayland::Client::ServerSideDecoration::Mode::None); - QSignalSpy modeChangedSpy(serverSideDecoration.get(), &KWayland::Client::ServerSideDecoration::modeChanged); + auto serverSideDecoration = std::make_unique(); + serverSideDecoration->init(m_serverSideDecorationManager->create(*surface.get())); + QSignalSpy modeChangedSpy(serverSideDecoration.get(), &ServerSideDecoration::modeChanged); QVERIFY(decorationCreated.wait()); @@ -176,7 +206,7 @@ void TestServerSideDecoration::testCreate() // after binding the client should get the default mode QVERIFY(modeChangedSpy.wait()); QCOMPARE(modeChangedSpy.count(), 1); - QTEST(serverSideDecoration->mode(), "clientMode"); + QTEST(modeChangedSpy.last().at(0).value(), "clientMode"); // and destroy QSignalSpy destroyedSpy(serverDeco, &QObject::destroyed); @@ -188,16 +218,16 @@ void TestServerSideDecoration::testRequest_data() { using namespace KWin; QTest::addColumn("defaultMode"); - QTest::addColumn("clientMode"); - QTest::addColumn("clientRequestMode"); + QTest::addColumn("clientMode"); + QTest::addColumn("clientRequestMode"); QTest::addColumn("serverRequestedMode"); const auto serverNone = ServerSideDecorationManagerInterface::Mode::None; const auto serverClient = ServerSideDecorationManagerInterface::Mode::Client; const auto serverServer = ServerSideDecorationManagerInterface::Mode::Server; - const auto clientNone = KWayland::Client::ServerSideDecoration::Mode::None; - const auto clientClient = KWayland::Client::ServerSideDecoration::Mode::Client; - const auto clientServer = KWayland::Client::ServerSideDecoration::Mode::Server; + const auto clientNone = ServerSideDecorationManager::mode_None; + const auto clientClient = ServerSideDecorationManager::mode_Client; + const auto clientServer = ServerSideDecorationManager::mode_Server; QTest::newRow("none->none") << serverNone << clientNone << clientNone << serverNone; QTest::newRow("none->client") << serverNone << clientNone << clientClient << serverClient; @@ -222,9 +252,10 @@ void TestServerSideDecoration::testRequest() // create server side deco std::unique_ptr surface(m_compositor->createSurface()); - std::unique_ptr serverSideDecoration(m_serverSideDecorationManager->create(surface.get())); - QCOMPARE(serverSideDecoration->mode(), KWayland::Client::ServerSideDecoration::Mode::None); - QSignalSpy modeChangedSpy(serverSideDecoration.get(), &KWayland::Client::ServerSideDecoration::modeChanged); + + auto serverSideDecoration = std::make_unique(); + serverSideDecoration->init(m_serverSideDecorationManager->create(*surface.get())); + QSignalSpy modeChangedSpy(serverSideDecoration.get(), &ServerSideDecoration::modeChanged); QVERIFY(decorationCreated.wait()); auto serverDeco = decorationCreated.first().first().value(); @@ -234,13 +265,13 @@ void TestServerSideDecoration::testRequest() // after binding the client should get the default mode QVERIFY(modeChangedSpy.wait()); QCOMPARE(modeChangedSpy.count(), 1); - QTEST(serverSideDecoration->mode(), "clientMode"); + QTEST(modeChangedSpy.last().at(0).value(), "clientMode"); // request a change - QFETCH(KWayland::Client::ServerSideDecoration::Mode, clientRequestMode); - serverSideDecoration->requestMode(clientRequestMode); + QFETCH(ServerSideDecorationManager::mode, clientRequestMode); + serverSideDecoration->request_mode(clientRequestMode); // mode not yet changed - QTEST(serverSideDecoration->mode(), "clientMode"); + QCOMPARE(modeChangedSpy.count(), 1); QVERIFY(preferredModeChangedSpy.wait()); QCOMPARE(preferredModeChangedSpy.count(), 1); @@ -255,7 +286,7 @@ void TestServerSideDecoration::testRequest() // should be sent to client QVERIFY(modeChangedSpy.wait()); QCOMPARE(modeChangedSpy.count(), 2); - QCOMPARE(serverSideDecoration->mode(), clientRequestMode); + QCOMPARE(modeChangedSpy.last().at(0).value(), clientRequestMode); } void TestServerSideDecoration::testSurfaceDestroy() @@ -268,8 +299,9 @@ void TestServerSideDecoration::testSurfaceDestroy() QVERIFY(serverSurfaceCreated.wait()); auto serverSurface = serverSurfaceCreated.first().first().value(); - std::unique_ptr serverSideDecoration(m_serverSideDecorationManager->create(surface.get())); - QCOMPARE(serverSideDecoration->mode(), KWayland::Client::ServerSideDecoration::Mode::None); + auto serverSideDecoration = std::make_unique(); + serverSideDecoration->init(m_serverSideDecorationManager->create(*surface.get())); + QSignalSpy modeChangedSpy(serverSideDecoration.get(), &ServerSideDecoration::modeChanged); QVERIFY(decorationCreated.wait()); auto serverDeco = decorationCreated.first().first().value(); QVERIFY(serverDeco); diff --git a/src/wayland/tests/xdgforeigntest.cpp b/src/wayland/tests/xdgforeigntest.cpp index 386203c5ee..b1a34a560c 100644 --- a/src/wayland/tests/xdgforeigntest.cpp +++ b/src/wayland/tests/xdgforeigntest.cpp @@ -9,7 +9,6 @@ #include "KWayland/Client/connection_thread.h" #include "KWayland/Client/event_queue.h" #include "KWayland/Client/registry.h" -#include "KWayland/Client/server_decoration.h" #include "KWayland/Client/shell.h" #include "KWayland/Client/shm_pool.h" #include "KWayland/Client/xdgshell.h" @@ -49,7 +48,6 @@ private: KWayland::Client::XdgImporter *m_importer = nullptr; KWayland::Client::XdgExported *m_exported = nullptr; KWayland::Client::XdgImported *m_imported = nullptr; - KWayland::Client::ServerSideDecorationManager *m_decoration = nullptr; }; XdgForeignTest::XdgForeignTest(QObject *parent) @@ -105,10 +103,6 @@ void XdgForeignTest::setupRegistry(Registry *registry) m_importer = registry->createXdgImporter(name, version, this); m_importer->setEventQueue(m_eventQueue); }); - connect(registry, &Registry::serverSideDecorationManagerAnnounced, this, [this, registry](quint32 name, quint32 version) { - m_decoration = registry->createServerSideDecorationManager(name, version, this); - m_decoration->setEventQueue(m_eventQueue); - }); connect(registry, &Registry::interfacesAnnounced, this, [this] { Q_ASSERT(m_compositor); Q_ASSERT(m_shell); @@ -117,22 +111,17 @@ void XdgForeignTest::setupRegistry(Registry *registry) Q_ASSERT(m_importer); m_surface = m_compositor->createSurface(this); Q_ASSERT(m_surface); - auto parentDeco = m_decoration->create(m_surface, this); - Q_ASSERT(parentDeco); m_shellSurface = m_shell->createSurface(m_surface, this); Q_ASSERT(m_shellSurface); connect(m_shellSurface, &XdgShellSurface::sizeChanged, this, &XdgForeignTest::render); m_childSurface = m_compositor->createSurface(this); Q_ASSERT(m_childSurface); - auto childDeco = m_decoration->create(m_childSurface, this); - Q_ASSERT(childDeco); m_childShellSurface = m_shell->createSurface(m_childSurface, this); Q_ASSERT(m_childShellSurface); connect(m_childShellSurface, &XdgShellSurface::sizeChanged, this, &XdgForeignTest::render); m_exported = m_exporter->exportTopLevel(m_surface, this); - Q_ASSERT(m_decoration); connect(m_exported, &XdgExported::done, this, [this]() { m_imported = m_importer->importTopLevel(m_exported->handle(), this); m_imported->setParentOf(m_childSurface);