autotests: Destroy WaylandServer before Application

This commit is contained in:
Vlad Zahorodnii 2024-05-24 22:11:22 +03:00
parent 79238b06cf
commit d048f9aad8
2 changed files with 7 additions and 1 deletions

View file

@ -95,7 +95,7 @@ WaylandTestApplication::WaylandTestApplication(OperationMode mode, int &argc, ch
setSession(Session::create(Session::Type::Noop)); setSession(Session::create(Session::Type::Noop));
setOutputBackend(std::make_unique<VirtualBackend>()); setOutputBackend(std::make_unique<VirtualBackend>());
WaylandServer::create(this); m_waylandServer.reset(WaylandServer::create());
setProcessStartupEnvironment(QProcessEnvironment::systemEnvironment()); setProcessStartupEnvironment(QProcessEnvironment::systemEnvironment());
} }
@ -116,6 +116,7 @@ WaylandTestApplication::~WaylandTestApplication()
destroyInputMethod(); destroyInputMethod();
destroyCompositor(); destroyCompositor();
destroyInput(); destroyInput();
m_waylandServer.reset();
} }
void WaylandTestApplication::createVirtualInputDevices() void WaylandTestApplication::createVirtualInputDevices()

View file

@ -73,6 +73,9 @@ class ScreencastingV1;
namespace KWin namespace KWin
{ {
class WaylandServer;
#if KWIN_BUILD_X11 #if KWIN_BUILD_X11
namespace Xwl namespace Xwl
{ {
@ -113,6 +116,8 @@ private:
void createVirtualInputDevices(); void createVirtualInputDevices();
void destroyVirtualInputDevices(); void destroyVirtualInputDevices();
std::unique_ptr<WaylandServer> m_waylandServer;
#if KWIN_BUILD_X11 #if KWIN_BUILD_X11
std::unique_ptr<Xwl::Xwayland> m_xwayland; std::unique_ptr<Xwl::Xwayland> m_xwayland;
#endif #endif