Show the tray menu.
Defined in <SDL3/SDL_tray.h>
bool SDL_ShowTrayMenu(SDL_Tray *tray, const SDL_FPoint *position);| SDL_Tray * | tray | the tray icon whose menu should be shown. |
| const SDL_FPoint * | position | the position to show the menu in global screen coordinates, or NULL to use the default position. |
(bool) Returns true on success or false on failure; call SDL_GetError() for more information.
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.
This function should be called on the thread that created the tray.
This function is available since SDL 3.6.0.