Qt: Fix exclusive fullscreen sometimes appearing on wrong screen

This commit is contained in:
TheLastRar 2025-11-21 22:35:19 +00:00
parent 6deb43bde2
commit 8ddfa8fc12
1 changed files with 11 additions and 3 deletions

View File

@ -2562,7 +2562,7 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
m_display_container = m_display_surface->createWindowContainer(getContentParent());
}
if (fullscreen)
if (fullscreen || g_emu_thread->isExclusiveFullscreen())
{
// On Wayland, while move/restoreGeometry can't position the window, it can influence which screen they show up on.
// Other platforms can position windows fine, but the only thing that matters here is the screen.
@ -2572,13 +2572,21 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main)
m_display_surface->setFramePosition(pos());
else
restoreDisplayWindowGeometryFromConfig();
m_display_surface->showFullScreen();
if (fullscreen)
m_display_surface->showFullScreen();
else
m_display_surface->showNormal();
#else
if (isVisible() && g_emu_thread->shouldRenderToMain())
m_display_container->move(pos());
else
restoreDisplayWindowGeometryFromConfig();
m_display_container->showFullScreen();
if (fullscreen)
m_display_container->showFullScreen();
else
m_display_container->showNormal();
#endif
}
else if (!render_to_main)