Qt: Work around popups opened behind window in Wayland
This commit is contained in:
parent
373297f35b
commit
2610bb11cd
|
@ -2747,8 +2747,17 @@ MainWindow::SystemLock MainWindow::pauseAndLockSystem()
|
||||||
if (was_fullscreen)
|
if (was_fullscreen)
|
||||||
g_emu_thread->setSurfaceless(true);
|
g_emu_thread->setSurfaceless(true);
|
||||||
if (!was_paused)
|
if (!was_paused)
|
||||||
|
{
|
||||||
g_emu_thread->setSystemPaused(true);
|
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,
|
// 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.
|
// since it's going to get destroyed by the surfaceless call above.
|
||||||
QWidget* dialog_parent = was_fullscreen ? static_cast<QWidget*>(this) : getDisplayContainer();
|
QWidget* dialog_parent = was_fullscreen ? static_cast<QWidget*>(this) : getDisplayContainer();
|
||||||
|
|
Loading…
Reference in New Issue