Skip to content

Prevent Windows borderless mode from taking exclusive fullscreen - #347

Merged
cybersecurity merged 1 commit into
OpenCommunityEdition:mainfrom
johncranston303:fix/windows-borderless-alt-tab
Oct 19, 2026
Merged

cybersecurity merged 1 commit into
OpenCommunityEdition:mainfrom
johncranston303:fix/windows-borderless-alt-tab

Conversation

@johncranston303

@johncranston303 johncranston303 commented Oct 14, 2026 •

Copy link
Copy Markdown

Borderless mode can blank the monitor on Alt+Tab because NVIDIA's OpenGL driver treats SDL's popup fullscreen window as exclusive, even without a selected display mode.

Clear the popup and topmost styles for borderless windows before OpenGL context creation and presentation. Reapply this when SDL restores those styles after mode or focus changes. Explicit fullscreen retains its existing behavior.

Tested and working on an NVIDIA RTX 3090.

NVIDIA's OpenGL driver can treat SDL's popup fullscreen window as exclusive even when no display mode is selected, blanking the monitor on Alt+Tab. Clear popup and topmost styles for borderless windows before context creation and presentation, including after SDL restores them. Explicit fullscreen keeps its existing behavior.

Checked: Windows release build; hidden native window probe covering styles, bounds, focus, repeated application and mode isolation; git diff --check. Live Alt+Tab was not tested. Android and web targets were unavailable; pytest was not installed.
@johncranston303
johncranston303 force-pushed the fix/windows-borderless-alt-tab branch from 92511ab to 27977a8 Compare October 15, 2026 00:33
@mastercheese-dev

Copy link
Copy Markdown

I personally was shown the difference via a live stream and believe this to be a needed quality of life improvement for Windows clients, however I was not able to pull in the code myself and test as I do not have a Windows machine to test with. I recommend cherry picking and testing.

Steps:

  1. On a Windows machine with an Nvidia GPU try to tab out and open a YouTube pop out window and tab back into the game, you will not see the pop out video overlayed onto the game.
  2. Cherry pick this and repeat step 1 and see that it works.

@GuvenHuso

@GuvenHuso GuvenHuso assigned GuvenHuso and unassigned GuvenHuso Oct 17, 2026
@GuvenHuso
GuvenHuso self-requested a review October 17, 2026 22:56
@VerySmuggy VerySmuggy added bug Something isn't working priority: high Should be handled soon labels Oct 19, 2026
@cybersecurity
cybersecurity merged commit 79e5c97 into OpenCommunityEdition:main Oct 19, 2026
FractumSeraph pushed a commit to FractumSeraph/OpenCE that referenced this pull request Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high Should be handled soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants