[wayland] Don't use waitForFinished on the Xwayland QProcess
WaitForFinished blocks our main thread, but Xwayland wants to talk to Wayland and blocks as well. So let's ensure events are processed while terminating Xwayland.icc-effect-5.14.5
parent
240e7ba337
commit
f6ef9e8d8c
|
@ -68,7 +68,9 @@ WaylandTestApplication::~WaylandTestApplication()
|
|||
}
|
||||
if (m_xwaylandProcess) {
|
||||
m_xwaylandProcess->terminate();
|
||||
m_xwaylandProcess->waitForFinished();
|
||||
while (m_xwaylandProcess->state() != QProcess::NotRunning) {
|
||||
processEvents(QEventLoop::WaitForMoreEvents);
|
||||
}
|
||||
waylandServer()->destroyXWaylandConnection();
|
||||
}
|
||||
waylandServer()->destroyInternalConnection();
|
||||
|
|
|
@ -92,7 +92,9 @@ ApplicationWayland::~ApplicationWayland()
|
|||
}
|
||||
if (m_xwaylandProcess) {
|
||||
m_xwaylandProcess->terminate();
|
||||
m_xwaylandProcess->waitForFinished();
|
||||
while (m_xwaylandProcess->state() != QProcess::NotRunning) {
|
||||
processEvents(QEventLoop::WaitForMoreEvents);
|
||||
}
|
||||
waylandServer()->destroyXWaylandConnection();
|
||||
}
|
||||
waylandServer()->destroyInternalConnection();
|
||||
|
|
Loading…
Reference in New Issue