# SDL_ShowTrayMenu Show the tray menu. ## Header File Defined in [](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_tray.h) ## Syntax ```c bool SDL_ShowTrayMenu(SDL_Tray *tray, const SDL_FPoint *position); ``` ## Function Parameters | | | | | -------------------------------- | ------------ | ------------------------------------------------------------------------------------------------ | | [SDL_Tray](SDL_Tray) * | **tray** | the tray icon whose menu should be shown. | | const [SDL_FPoint](SDL_FPoint) * | **position** | the position to show the menu in global screen coordinates, or NULL to use the default position. | ## Return Value (bool) Returns true on success or false on failure; call [SDL_GetError](SDL_GetError)() for more information. ## Remarks This can be used to show the tray menu from an activate callback, for example to decide whether to show the menu based on application state. On Windows, the menu is shown at the given position, or at the mouse position if it's NULL. To show the menu where the tray icon was activated, pass the position given to the activate callback. On macOS, the menu is always shown below the tray icon. This is not supported on Linux, where the desktop environment decides when to show the tray menu. ## Thread Safety This function should be called on the thread that created the tray. ## Version This function is available since SDL 3.6.0. ---- [CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction), [CategoryTray](CategoryTray)