Qt: Use main window geometry for temporary window

When displaying the confirm popup when fullscreen.
This commit is contained in:
Stenzek 2023-11-21 14:33:59 +10:00 committed by Connor McLaughlin
parent b79edf1cb5
commit f18964ad44
1 changed files with 9 additions and 3 deletions

View File

@ -2022,7 +2022,10 @@ std::optional<WindowInfo> MainWindow::acquireRenderWindow(bool recreate_window,
} }
else else
{ {
restoreDisplayWindowGeometryFromConfig(); if (m_is_temporarily_windowed && g_emu_thread->shouldRenderToMain())
container->setGeometry(geometry());
else
restoreDisplayWindowGeometryFromConfig();
container->showNormal(); container->showNormal();
} }
@ -2098,7 +2101,7 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
// and positioning has no effect anyway. // and positioning has no effect anyway.
if (!s_use_central_widget) if (!s_use_central_widget)
{ {
if ((isVisible() || m_is_temporarily_windowed) && g_emu_thread->shouldRenderToMain()) if (isVisible() && g_emu_thread->shouldRenderToMain())
container->move(pos()); container->move(pos());
else else
restoreDisplayWindowGeometryFromConfig(); restoreDisplayWindowGeometryFromConfig();
@ -2108,7 +2111,10 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
} }
else if (!render_to_main) else if (!render_to_main)
{ {
restoreDisplayWindowGeometryFromConfig(); if (m_is_temporarily_windowed && g_emu_thread->shouldRenderToMain())
container->setGeometry(geometry());
else
restoreDisplayWindowGeometryFromConfig();
container->showNormal(); container->showNormal();
} }
else if (s_use_central_widget) else if (s_use_central_widget)