Skip to content

Commit

Permalink
MainWindow: Prevent Confirm On Stop dialog from being hidden
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dentomologist committed Aug 27, 2024
1 parent 5af0ae2 commit 9bdf862
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/DolphinQt/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<QWidget*>(this);
Expand Down

0 comments on commit 9bdf862

Please sign in to comment.