Commit 92f4944b authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

Wayland backend: Don't crash when closing up

Remember to release all resources before the wayland socket goes:
- release the seat as we give up a seat
- release the pointer and ssdManager
- release the output decoration with the output itself
Otherwise they leak and stay dangling.


(cherry picked from commit fa29bac9)
parent c194420f
Pipeline #232647 failed with stage
in 1 minute and 3 seconds
......@@ -485,6 +485,7 @@ WaylandSeat::~WaylandSeat()
destroyPointerDevice();
destroyKeyboardDevice();
destroyTouchDevice();
m_seat->release();
}
void WaylandSeat::createPointerDevice()
......@@ -578,6 +579,13 @@ WaylandBackend::~WaylandBackend()
eglTerminate(sceneEglDisplay());
}
if (m_relativePointerManager) {
m_relativePointerManager->release();
}
if (m_ssdManager) {
m_ssdManager->release();
}
if (m_pointerGestures) {
m_pointerGestures->release();
}
......@@ -768,7 +776,7 @@ WaylandOutput *WaylandBackend::createOutput(const QString &name, const QSize &si
}
if (ssdManager()) {
auto decoration = ssdManager()->create(surface.get(), this);
auto decoration = ssdManager()->create(surface.get(), surface.get());
connect(decoration, &ServerSideDecoration::modeChanged, this, [decoration] {
if (decoration->mode() != ServerSideDecoration::Mode::Server) {
decoration->requestMode(ServerSideDecoration::Mode::Server);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment