mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-21 01:20:07 +00:00
Qt: Update menu and toolbar state when toggling fullscreen via double click
Amends 1289e045b9431b3dfe4ea759f0301392672d04a5
This commit is contained in:
parent
f446e24b20
commit
1b56940ad0
@ -283,7 +283,7 @@ std::optional<WindowInfo> MainWindow::acquireRenderWindow(RenderAPI render_api,
|
|||||||
// Container can also be null if we're messing with settings while surfaceless.
|
// Container can also be null if we're messing with settings while surfaceless.
|
||||||
const bool has_container = (m_display_container != nullptr);
|
const bool has_container = (m_display_container != nullptr);
|
||||||
const bool needs_container = DisplayContainer::isNeeded(fullscreen, render_to_main);
|
const bool needs_container = DisplayContainer::isNeeded(fullscreen, render_to_main);
|
||||||
if (container && !is_rendering_to_main && !render_to_main && has_container == needs_container && !needs_container &&
|
if (container && !is_rendering_to_main && !render_to_main && !has_container && !needs_container &&
|
||||||
!changing_surfaceless)
|
!changing_surfaceless)
|
||||||
{
|
{
|
||||||
DEV_LOG("Toggling to {} without recreating surface", (fullscreen ? "fullscreen" : "windowed"));
|
DEV_LOG("Toggling to {} without recreating surface", (fullscreen ? "fullscreen" : "windowed"));
|
||||||
@ -306,6 +306,7 @@ std::optional<WindowInfo> MainWindow::acquireRenderWindow(RenderAPI render_api,
|
|||||||
restoreDisplayWindowGeometryFromConfig();
|
restoreDisplayWindowGeometryFromConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateDisplayRelatedActions(!surfaceless, fullscreen);
|
||||||
updateDisplayWidgetCursor();
|
updateDisplayWidgetCursor();
|
||||||
m_display_widget->setFocus();
|
m_display_widget->setFocus();
|
||||||
updateWindowState();
|
updateWindowState();
|
||||||
@ -410,7 +411,6 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
|
|||||||
|
|
||||||
updateDisplayRelatedActions(true, fullscreen);
|
updateDisplayRelatedActions(true, fullscreen);
|
||||||
updateShortcutActions(false);
|
updateShortcutActions(false);
|
||||||
|
|
||||||
updateDisplayWidgetCursor();
|
updateDisplayWidgetCursor();
|
||||||
|
|
||||||
// We need the surface visible.
|
// We need the surface visible.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user