Skip to content

Qt/Mac: Exit fullscreen on the display widget before destroying it - #14804

Closed
TheLastRar wants to merge 3 commits into
PCSX2:masterfrom
TheLastRar:mac-exit-fullscreen
Closed

Qt/Mac: Exit fullscreen on the display widget before destroying it#14804
TheLastRar wants to merge 3 commits into
PCSX2:masterfrom
TheLastRar:mac-exit-fullscreen

Conversation

@TheLastRar

Copy link
Copy Markdown
Contributor

Description of Changes

Exits fullscreen mode on the display widget before destroying it.

Rationale behind Changes

We use a separate display window for fullscreen presentation.
Mac apparently shares the fullscreen state for all windows of an application, instead of just the display window.

Poir to v2.5.303, we would close the display window, however, that could full close the application in some situations (#12784)

Instead, I'm hoping that exiting fullscreen on the display widget will be enough to fix #14801.

Suggested Testing Steps (Mac Only)

Test exiting fullscreen emulation on Mac.

Did you use AI to help find, test, or implement this issue or feature?

No

Mac apparently shares the fullscreen state for all windows of an application
@github-actions github-actions Bot added the GUI/Qt label Aug 2, 2026
@lightningterror lightningterror added this to the Release 2.8 milestone Aug 2, 2026

@kamfretoz kamfretoz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Screen.Recording.2026-08-03.at.23.24.39.mov

@SternXD SternXD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going back to macOS from Fullscreen causes there to be a separate blank window (View -> Fullscreen) it doesn't do this when going to Fullscreen by pressing "the green button" though

@SternXD SternXD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly same issue even after recent push

Comment thread pcsx2-qt/MainWindow.cpp
Comment on lines 3012 to 3016
if (m_display_surface->isFullScreen())
{
#ifdef DISPLAY_SURFACE_WINDOW
m_display_surface->showNormal();
m_display_surface->setWindowStates(m_display_surface->windowStates() & ~Qt::WindowFullScreen);
#else

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Display surface window is only defined on Windows (check lines ~113-115). You can leave out the code with m_display_surface and just work with with m_display_container which is for Mac/Linux.

@TheLastRar

Copy link
Copy Markdown
Contributor Author

Closing in favour of #14841
While this PR did fix the issue in question, testing found that exiting full screen would leave a zombie window behind (on some systems?)

@TheLastRar TheLastRar closed this Aug 13, 2026
@lightningterror lightningterror removed this from the Release 2.8 milestone Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Leaving fullscreen does not work properly on macos

5 participants