Get the area of a tray icon in global screen coordinates.
Defined in <SDL3/SDL_tray.h>
bool SDL_GetTrayIconRect(SDL_Tray *tray, SDL_Rect *rect);| SDL_Tray * | tray | the tray icon to query. |
| SDL_Rect * | rect | a pointer filled in with the tray icon area. |
(bool) Returns true on success or false on failure; call SDL_GetError() for more information.
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.
This function should be called on the thread that created the tray.
This function is available since SDL 3.6.0.