diff --git a/backends/wayland/wayland_backend.cpp b/backends/wayland/wayland_backend.cpp index 430f630073..5b4dfeee19 100644 --- a/backends/wayland/wayland_backend.cpp +++ b/backends/wayland/wayland_backend.cpp @@ -40,6 +40,7 @@ along with this program. If not, see . #include #include #include +#include #include #include #include @@ -424,6 +425,19 @@ void WaylandBackend::createSurface() qCCritical(KWIN_WAYLAND_BACKEND) << "Creating Wayland Surface failed"; return; } + using namespace KWayland::Client; + auto iface = m_registry->interface(Registry::Interface::ServerSideDecorationManager); + if (iface.name != 0) { + auto manager = m_registry->createServerSideDecorationManager(iface.name, iface.version, this); + auto decoration = manager->create(m_surface, this); + connect(decoration, &ServerSideDecoration::modeChanged, this, + [this, decoration] { + if (decoration->mode() != ServerSideDecoration::Mode::Server) { + decoration->requestMode(ServerSideDecoration::Mode::Server); + } + } + ); + } if (m_seat) { m_seat->setInstallCursor(true); }