This commit is contained in:
Davide Pesavento 2025-07-18 21:02:32 -04:00 committed by GitHub
commit 5237e06d0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -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.
const bool has_container = (m_display_container != nullptr);
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)
{
DEV_LOG("Toggling to {} without recreating surface", (fullscreen ? "fullscreen" : "windowed"));
@ -306,6 +306,7 @@ std::optional<WindowInfo> MainWindow::acquireRenderWindow(RenderAPI render_api,
restoreDisplayWindowGeometryFromConfig();
}
updateDisplayRelatedActions(!surfaceless, fullscreen);
updateDisplayWidgetCursor();
m_display_widget->setFocus();
updateWindowState();
@ -410,7 +411,6 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
updateDisplayRelatedActions(true, fullscreen);
updateShortcutActions(false);
updateDisplayWidgetCursor();
// We need the surface visible.
@ -2189,8 +2189,9 @@ bool MainWindow::shouldHideMainWindow() const
void MainWindow::switchToGameListView()
{
// Normally, we'd never end up here. But on MacOS, the global menu is accessible while fullscreen.
exitFullscreen(true);
if (QtHost::CanRenderToMainWindow())
// Normally, we'd never end up here. But on MacOS, the global menu is accessible while fullscreen.
exitFullscreen(true);
if (!isShowingGameList())
{
@ -3040,8 +3041,7 @@ void MainWindow::onToolsCoverDownloaderTriggered()
{
// This can be invoked via big picture, so exit fullscreen.
// Wait for the fullscreen request to actually go through, otherwise the downloader appears behind the main window.
if (isRenderingFullscreen())
exitFullscreen(true);
exitFullscreen(true);
if (!m_cover_download_window)
{