Wayland backend: Don't crash when terminating
Remember to release all resources before the wayland socket goes: - release the seat as we give up a seat - release the ssdManager - release the output decoration with the output itself Otherwise they leak and stay dangling.
This commit is contained in:
parent
d7cba6b625
commit
fdf2011b34
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue