Commit ee7da425 authored by Martin Flöser's avatar Martin Flöser

Unpolish QStyle on QApp prior to destroying internal Wayland connection

Summary:
The QStyle might interact with our internal Wayland connection. If the
cleanup happens after destroying our internal Wayland connection KWin
will crash at tear-down.

With this change the QStyle can perform cleanup already prior to the
deconstruction of the Wayland connection.

CCBUG: 372001

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3241
parent f3325a1c
......@@ -30,6 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QAbstractEventDispatcher>
#include <QPluginLoader>
#include <QSocketNotifier>
#include <QStyle>
#include <QThread>
#include <QtConcurrentRun>
......@@ -80,6 +81,9 @@ WaylandTestApplication::~WaylandTestApplication()
}
waylandServer()->destroyXWaylandConnection();
}
if (QStyle *s = style()) {
s->unpolish(this);
}
waylandServer()->terminateClientConnections();
destroyCompositor();
}
......
......@@ -45,6 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QFutureWatcher>
#include <QProcess>
#include <QSocketNotifier>
#include <QStyle>
#include <QThread>
#include <QDebug>
#include <QWindow>
......@@ -114,6 +115,9 @@ ApplicationWayland::~ApplicationWayland()
}
waylandServer()->destroyXWaylandConnection();
}
if (QStyle *s = style()) {
s->unpolish(this);
}
waylandServer()->terminateClientConnections();
destroyCompositor();
}
......
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