[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.
This commit is contained in:
parent
240e7ba337
commit
f6ef9e8d8c
2 changed files with 6 additions and 2 deletions
|
@ -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 a new issue