mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-08-30 05:51:01 +00:00
Fix app window not hiding when streaming starts
This commit is contained in:
@@ -529,6 +529,7 @@ void Session::emitLaunchWarning(QString text)
|
|||||||
// Pump the UI loop while we wait
|
// Pump the UI loop while we wait
|
||||||
SDL_Delay(5);
|
SDL_Delay(5);
|
||||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
|
QCoreApplication::sendPostedEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1071,8 +1072,14 @@ void Session::exec(int displayOriginX, int displayOriginY)
|
|||||||
asyncConnThread.start();
|
asyncConnThread.start();
|
||||||
while (!asyncConnThread.wait(10)) {
|
while (!asyncConnThread.wait(10)) {
|
||||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
|
QCoreApplication::sendPostedEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pump the event loop one last time to ensure we pick up any events from
|
||||||
|
// the thread that happened while it was in the final successful QThread::wait().
|
||||||
|
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
|
QCoreApplication::sendPostedEvents();
|
||||||
|
|
||||||
// If the connection failed, clean up and abort the connection.
|
// If the connection failed, clean up and abort the connection.
|
||||||
if (!m_AsyncConnectionSuccess) {
|
if (!m_AsyncConnectionSuccess) {
|
||||||
delete m_InputHandler;
|
delete m_InputHandler;
|
||||||
|
|||||||
Reference in New Issue
Block a user