From 9bdf862460d19d5809350442140d19256d8202b4 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Tue, 27 Aug 2024 14:48:37 -0700 Subject: [PATCH] MainWindow: Prevent Confirm On Stop dialog from being hidden Set the Render Window as the parent of the Confirm On Stop confirmation dialog when Keep Window On Top is enabled, ensuring it will always be visible. Previously, when Confirm On Stop and Keep Window On Top were both enabled the Confirm On Stop dialog could be hidden by the render window in the following situations: * Clicking Stop in the Main Window * Clicking the Main Window's close button * Pressing the Stop hotkey while in FullScreen mode This was particularly troublesome because the confirm dialog is modal, preventing the user from moving the render window out of the way if it was obscuring the dialog. Fixes https://bugs.dolphin-emu.org/issues/13247. --- Source/Core/DolphinQt/MainWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index a02f26b7a91b..5c3ca31d5a27 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -925,7 +925,8 @@ bool MainWindow::RequestStop() } const bool rendered_widget_was_active = - m_render_widget->isActiveWindow() && !m_render_widget->isFullScreen(); + Settings::Instance().IsKeepWindowOnTopEnabled() || + (m_render_widget->isActiveWindow() && !m_render_widget->isFullScreen()); QWidget* confirm_parent = (!m_rendering_to_main && rendered_widget_was_active) ? m_render_widget : static_cast(this);