diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index ebf44ab1e..770aece71 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -2747,8 +2747,17 @@ MainWindow::SystemLock MainWindow::pauseAndLockSystem() if (was_fullscreen) g_emu_thread->setSurfaceless(true); if (!was_paused) + { g_emu_thread->setSystemPaused(true); + // Need to wait for the pause to go through, and make the main window visible if needed. + while (!s_system_paused) + QApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 1); + + // Ensure it's visible before we try to create any dialogs parented to us. + QApplication::sync(); + } + // We want to parent dialogs to the display widget, except if we were fullscreen, // since it's going to get destroyed by the surfaceless call above. QWidget* dialog_parent = was_fullscreen ? static_cast(this) : getDisplayContainer();