---
name: "SDL_GetTrayMenuParentTray"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetTrayMenuParentTray"
---

# SDL\_GetTrayMenuParentTray(3)

Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.

## NAME

SDL\_GetTrayMenuParentTray - Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.

## HEADER FILE

Defined in SDL3/SDL\_tray.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_Tray \* SDL\_GetTrayMenuParentTray(SDL\_TrayMenu \*menu);**

## DESCRIPTION

Either this function or

**SDL\_GetTrayMenuParentEntry** () will return non-NULL for any given menu.

## FUNCTION PARAMETERS

- *menu*

  the menu for which to get the parent enttrayry.

## RETURN VALUE

( **SDL\_Tray**\
  \*) Returns the parent tray, or NULL if this menu is a submenu.

## THREAD SAFETY

This function should be called on the thread that created the tray.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateTrayMenu**(3)](/SDL_CreateTrayMenu/3.md), **•**(3), [**SDL\_GetTrayMenuParentEntry**(3)](/SDL_GetTrayMenuParentEntry/3.md)
