qt: Fix macOS freeze-on-boot caused by unprocessed events

As far as I can tell the line added here really shouldn't be necessary and wasn't until a relatively recent change in either Qt or macOS. The exact reason behind the original issue is unclear, but by educated guess it could have been caused by some kind of race condition within Qt?
This commit is contained in:
OpenSauce04 2026-06-29 13:37:47 +01:00 committed by OpenSauce
parent 93143bcb15
commit 7c225c6abb

View file

@ -4456,6 +4456,9 @@ int LaunchQtFrontend(int argc, char* argv[]) {
QObject::connect(&app, &QGuiApplication::applicationStateChanged, &main_window,
&GMainWindow::OnAppFocusStateChanged);
// Process any pending events before executing the app (prevents freeze-onboot on macOS)
app.processEvents();
int result = app.exec();
return result;
}