waylandserver: fix race condition

When the xwayland connection gets destroyed, it doesn't get deleted immediately. If the
xwayland scale changes in between WaylandServer::destroyXWaylandConnection and the actual
destruction of the connection, KWin would crash
master
Xaver Hugl 12 months ago
parent 2eb72d0820
commit 03d0a226fb

@ -693,7 +693,9 @@ int WaylandServer::createXWaylandConnection()
m_xwaylandConnection->setScaleOverride(kwinApp()->xwaylandScale());
connect(kwinApp(), &Application::xwaylandScaleChanged, m_xwaylandConnection, [this]() {
m_xwaylandConnection->setScaleOverride(kwinApp()->xwaylandScale());
if (m_xwaylandConnection) {
m_xwaylandConnection->setScaleOverride(kwinApp()->xwaylandScale());
}
});
return socket.fd;

Loading…
Cancel
Save