From 8bd493eae0e6700ea9c279211b679822abb99a52 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 19 Jul 2025 13:46:32 +1000 Subject: [PATCH] Qt: Re-update main window geometry on nogui exit Also fix the game list refresh executing on the incorrect thread. --- src/duckstation-qt/qthost.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 2e27275f3..725cf3384 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -772,9 +772,16 @@ void EmuThread::exitFullscreenUI() stopFullscreenUI(); - // if we were in nogui mode, the game list won't have been populated yet. do it now. if (was_in_nogui_mode) - g_main_window->refreshGameList(false); + { + Host::RunOnUIThread([]() { + // Restore the geometry of the main window, since the display window may have been moved. + QtUtils::RestoreWindowGeometry("MainWindow", g_main_window); + + // if we were in nogui mode, the game list won't have been populated yet. do it now. + g_main_window->refreshGameList(false); + }); + } } void EmuThread::bootSystem(std::shared_ptr params)