---
name: "MenuPopdown"
section: "3x"
platform: "linux"
package: "libxt-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/XtPopdown/3x"
---

# MenuPopdown(3x)

unmap a pop-up

Part of [XtPopdown(3x)](/XtPopdown/3x.md).

## NAME

XtPopdown, XtCallbackPopdown - unmap a pop-up

## SYNTAX

void XtPopdown(Widget *popup\_shell*);

void XtCallbackPopdown(Widget *w*, XtPointer *client\_data*, XtPointer *call\_data*);

void MenuPopdown(String *shell\_name*);

## ARGUMENTS

- *call\_data*

  Specifies the callback data, which is not used by this procedure.

- *client\_data*

  Specifies a pointer to the *XtPopdownID* structure.

- *popup\_shell*

  Specifies the widget shell to pop down.

- *shell\_name*

  Specifies the name of the widget shell to pop down.

- *w*

  Specifies the widget.

## DESCRIPTION

The *XtPopdown* function performs the following:

- •

  Calls *XtCheckSubclass* to ensure popup\_shell is a subclass of *Shell*.

- •

  Checks that popup\_shell is currently popped\_up; otherwise, it generates an error.

- •

  Unmaps popup\_shell's window.

- •

  If popup\_shell's grab\_kind is either *XtGrabNonexclusive* or *XtGrabExclusive*, it calls *XtRemoveGrab*.

- •

  Sets pop-up shell's popped\_up field to  *False*.

- •

  Calls the callback procedures on the shell's popdown\_callback list.

The *XtCallbackPopdown* function casts the client data parameter to an *XtPopdownID* pointer:

```
typedef struct {
	Widget shell_widget;
	Widget enable_widget;
} XtPopdownIDRec, *XtPopdownID;

```

The shell\_widget is the pop-up shell to pop down, and the enable\_widget is the widget that was used to pop it up.

*XtCallbackPopdown* calls *XtPopdown* with the specified shell\_widget  and then calls *XtSetSensitive* to resensitize the enable\_widget.

If a shell name is not given, *MenuPopdown* calls *XtPopdown* with the widget for which the translation is specified. If a shell\_name is specified in the translation table, *MenuPopdown* tries to find the shell by looking up the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children  of that parent,  it pops down the shell;  otherwise, it moves up the parent chain as needed. If  *MenuPopdown* gets to the application top-level shell widget  and cannot find a matching shell,  it generates an error.

## SEE ALSO

XtCreatePopupShell(3Xt), XtPopup(3Xt)\
 *X Toolkit Intrinsics - C Language Interface*\
 *Xlib - C Language X Interface*
