Explicitly destroy WaylandServer in ApplicationWayland destructor

Otherwise the WaylandServer will be destroyed when QCoreAppplication is
gone, which is too late.
This commit is contained in:
Vlad Zahorodnii 2024-06-03 18:05:58 +03:00
parent b4822389c3
commit 7622921de6

View file

@ -133,6 +133,8 @@ ApplicationWayland::~ApplicationWayland()
destroyInputMethod();
destroyCompositor();
destroyInput();
delete WaylandServer::self();
}
void ApplicationWayland::performStartup()
@ -556,7 +558,7 @@ int main(int argc, char *argv[])
}
}
KWin::WaylandServer *server = KWin::WaylandServer::create(&a);
KWin::WaylandServer *server = KWin::WaylandServer::create();
KWin::WaylandServer::InitializationFlags flags;
#if KWIN_BUILD_SCREENLOCKER
if (parser.isSet(screenLockerOption)) {