Commit 1a359d5e authored by David Edmundson's avatar David Edmundson
Browse files

[wayland] Fix teardown order

Summary:
Valgrind flags an error on teardown.

EventQueue has a pointer to ConnectionThread internally
Registry has a pointer to the EventQueue internally

teardown order needs to be

Registry
EventQueue
Connection

registry was explicitly deleted before connectionthread already, we just
need to put event queue in the right place.

Test Plan: Ran kwin_wayland nested in valgrind

Reviewers: #kwin, cblack, apol

Reviewed By: cblack, apol

Subscribers: zzag, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28668
parent d0875aa1
......@@ -605,7 +605,7 @@ void WaylandServer::createInternalConnection()
connect(m_internalConnection.client, &ConnectionThread::connected, this,
[this] {
Registry *registry = new Registry(this);
EventQueue *eventQueue = new EventQueue(this);
EventQueue *eventQueue = new EventQueue(registry);
eventQueue->setup(m_internalConnection.client);
registry->setEventQueue(eventQueue);
registry->create(m_internalConnection.client);
......
Markdown is supported
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