From f18964ad443506549fa0eef7eba2faa1a138bb5b Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 21 Nov 2023 14:33:59 +1000 Subject: [PATCH] Qt: Use main window geometry for temporary window When displaying the confirm popup when fullscreen. --- pcsx2-qt/MainWindow.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 3eb0e2ff57..d183c8486a 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -2022,7 +2022,10 @@ std::optional MainWindow::acquireRenderWindow(bool recreate_window, } else { - restoreDisplayWindowGeometryFromConfig(); + if (m_is_temporarily_windowed && g_emu_thread->shouldRenderToMain()) + container->setGeometry(geometry()); + else + restoreDisplayWindowGeometryFromConfig(); container->showNormal(); } @@ -2098,7 +2101,7 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main) // and positioning has no effect anyway. if (!s_use_central_widget) { - if ((isVisible() || m_is_temporarily_windowed) && g_emu_thread->shouldRenderToMain()) + if (isVisible() && g_emu_thread->shouldRenderToMain()) container->move(pos()); else restoreDisplayWindowGeometryFromConfig(); @@ -2108,7 +2111,10 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool 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(); } else if (s_use_central_widget)