> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Window display modes and title-callable UI dialogs

> Configure PC game window display modes so title-callable UI (TCUI) dialogs render correctly and the Gaming Runtime prevents minimization on focus loss.

This topic covers the special considerations that are needed for dealing with window display modes on PC and successfully showing title-callable UI (TCUI) dialogs.

Ensure that the game window is visible before you invoke any APIs that might show TCUI. Also, the game window should use Full Screen Windowed/Borderless or Windowed/Non-Maximized mode rather than Full Screen Exclusive.

Games should run at the native display resolution rather than a custom app/game resolution. Some technologies (such as DirectX 9) don't gracefully handle the change in resolution when the TCUI dialog appears.

Beyond this, some middleware engines and wrappers, as well as DirectX 9, automatically minimize a full-screen game window when foreground focus is lost to the TCUI dialog. To work around this undesirable behavior for players, the platform explicitly denies window-minimizing when showing TCUI dialogs. For more details, see the Preventing game window minimization section later in this topic.

For game titles that use non-DirectX graphic technologies, our recommended best practices vary, shown as follows.

If the game title uses OpenGL or Vulkan, a "windowed" mode that shows a desktop-owned window border is needed to allow the TCUI dialogs to render over the game. This is because, based on the video card driver implementation, a game running in any kind of full-screen mode might render without Desktop Window Manager involvement. This prevents the TCUI dialog from showing over the game window.

For other graphics technologies, contact your XBOX support representative.

## Preventing game window minimization

Some middleware engines and layering systems (for example, Unity and Simple DirectMedia Layer (SDL)) automatically minimize the game's full-screen window when foreground focus is lost to the TCUI dialog.

To prevent this behavior, the Gaming Runtime uses [CBTProc](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms644977\(v=vs.85\)) to deny any requests to minimize the game window. The Gaming Runtime only applies this pattern when it detects that overlays can render over the full-screen DirectX game window and the TCUI dialog is visible.

In addition, the Gaming Runtime intercepts and modifies any style-change window messages prior to showing TCUI dialogs to prevent the game window from rendering a border or a title bar. Any styles in the [WS\_OVERLAPPEDWINDOW](https://learn.microsoft.com/windows/win32/winmsg/window-styles) group aren't applied on a style change unless they previously existed in the old style. This modification is only implemented during the lifetime of the TCUI dialog.

## DirectX 9 considerations with TCUI dialogs

Although the Gaming Runtime prevents DirectX 9 games from minimizing as described in Preventing game window minimization (earlier in this topic), they still lose foreground focus when a TCUI dialog appears. Your game should handle this focus loss gracefully, in the exact same way that it would respond to a player minimizing the game window while running full screen.

## Unity considerations with TCUI dialogs

Set `Application.runInBackground` to true for any game that expects to display a TCUI dialog.


## Related topics

- [XGameUiShowMessageDialogAsync](/reference/system/xgameui/functions/xgameuishowmessagedialogasync.md)
- [PlayFab Party speech-to-text and text display UX guidelines](/services/playfab/community/voice-communications/party-speech-to-text-ux-guidelines.md)
- [XGameUiShowErrorDialogAsync](/reference/system/xgameui/functions/xgameuishowerrordialogasync.md)
- [Fiddler on Windows PC](/build/console-features/networking/tools/fiddler-pc.md)
- [XGameUiShowErrorDialogUiCallback](/reference/system/xgameui/functions/xgameuishowerrordialoguicallback.md)
