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

[wayland] Fix teardown order

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 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:
parent d0875aa1
...@@ -605,7 +605,7 @@ void WaylandServer::createInternalConnection() ...@@ -605,7 +605,7 @@ void WaylandServer::createInternalConnection()
connect(m_internalConnection.client, &ConnectionThread::connected, this, connect(m_internalConnection.client, &ConnectionThread::connected, this,
[this] { [this] {
Registry *registry = new Registry(this); Registry *registry = new Registry(this);
EventQueue *eventQueue = new EventQueue(this); EventQueue *eventQueue = new EventQueue(registry);
eventQueue->setup(m_internalConnection.client); eventQueue->setup(m_internalConnection.client);
registry->setEventQueue(eventQueue); registry->setEventQueue(eventQueue);
registry->create(m_internalConnection.client); 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