---
name: "al_popup_menu"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_popup_menu"
---

# al\_popup\_menu(3)

Allegro 5 API

## NAME

al\_popup\_menu - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_native_dialog.h>
  bool al_popup_menu(ALLEGRO_MENU *popup, ALLEGRO_DISPLAY *display)
  ```

## DESCRIPTION

Displays a context menu next to the mouse cursor. The menu must have been created with [al\_create\_popup\_menu(3)](/al_create_popup_menu/3.md). It generates events just like a regular display menu does. It is possible that the menu will be canceled without any selection being made.

The `display` parameter indicates which window the menu is associated with (when you process the menu click event), but does not actually affect where the menu is located on the screen.

Returns `true` if the context menu was displayed.

*Note:* On Linux this function will fail if any of the mouse keys are held down. I.e. it will only reliably work if you handle it in `ALLEGRO_MOUSE_BUTTON_UP` events and even then only if that event corresponds to the final mouse button that was pressed.

## SINCE

5\.1.0

## SEE ALSO

[al\_create\_popup\_menu(3)](/al_create_popup_menu/3.md)
