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
This commit is contained in:
parent
2eb72d0820
commit
03d0a226fb
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue