Quick answer: Default to fullscreen borderless, not exclusive. Handle WM_ACTIVATE by pausing rendering, not recreating the swapchain.
Players running your game in fullscreen on Windows experience a flicker or screen-black moment whenever they alt-tab. Sometimes the game minimizes; sometimes it stays foreground but the screen blanks for half a second. Frustrating during streams or when checking messages.
Borderless vs Exclusive
Two fullscreen modes on Windows:
- Exclusive fullscreen: the game owns the GPU output. Tightest latency. Alt-tab triggers a mode change (slow, visible flicker). Overlays (Discord, OBS) struggle.
- Borderless fullscreen: window covers the screen; DWM composites. Alt-tab is smooth (instant focus switch). Overlays work cleanly.
Borderless is the modern default for almost all games. Reserve exclusive for competitive titles where the millisecond latency edge matters.
Setting Up Borderless Fullscreen
// Win32 example
HWND hwnd = ...;
LONG style = WS_POPUP; // no border, no caption
SetWindowLongPtr(hwnd, GWL_STYLE, style);
RECT rc;
GetWindowRect(GetDesktopWindow(), &rc);
SetWindowPos(hwnd, HWND_TOP, rc.left, rc.top,
rc.right - rc.left, rc.bottom - rc.top,
SWP_SHOWWINDOW);
WS_POPUP without WS_CAPTION gives a chromeless window; sized to full screen, indistinguishable from exclusive fullscreen visually but managed by DWM.
Alt-Tab Handling
case WM_ACTIVATE:
if (LOWORD(wparam) == WA_INACTIVE) {
// lost focus
isPaused = true;
// optional: reduce frame rate to save power
} else {
isPaused = false;
}
return 0;
Pause game logic; don’t recreate the swapchain. The swapchain survives focus changes in borderless mode; recreating it causes the flicker users see.
Engine-Specific Notes
- Unity: Player Settings → Fullscreen Mode → Fullscreen Window (not Exclusive Fullscreen).
- Unreal: GameUserSettings → FullscreenMode = WindowedFullscreen.
- Godot: Project Settings → Window Mode = Fullscreen (which is borderless in 4.x).
- SDL2: SDL_WINDOW_FULLSCREEN_DESKTOP, not SDL_WINDOW_FULLSCREEN.
Verifying
Alt-tab repeatedly. Borderless mode should swap seamlessly with the game continuing to update or pausing cleanly. No screen blanking, no GPU mode change. Compare to exclusive fullscreen (same engine, switched setting) and the difference is dramatic.
“Borderless is the modern default. Exclusive is for rare competitive needs. Alt-tab pause without swapchain recreation.”
Offer both modes in settings, but default to borderless. Recommend borderless for streamers and Discord users specifically in the UI.