# SDL_GetTrayIconRect Get the area of a tray icon in global screen coordinates. ## Header File Defined in [](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_tray.h) ## Syntax ```c bool SDL_GetTrayIconRect(SDL_Tray *tray, SDL_Rect *rect); ``` ## Function Parameters | | | | | ---------------------- | -------- | -------------------------------------------- | | [SDL_Tray](SDL_Tray) * | **tray** | the tray icon to query. | | [SDL_Rect](SDL_Rect) * | **rect** | a pointer filled in with the tray icon area. | ## 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 position a window next to the tray icon. This is not supported on Linux, where the desktop environment doesn't report where the tray icon is. The area may also not be available if the tray icon is hidden. ## 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)