.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "al_popup_menu" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_popup_menu - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include bool al_popup_menu(ALLEGRO_MENU *popup, ALLEGRO_DISPLAY *display) \f[R] .fi .SH DESCRIPTION .PP Displays a context menu next to the mouse cursor. The menu must have been created with al_create_popup_menu(3alleg5). It generates events just like a regular display menu does. It is possible that the menu will be canceled without any selection being made. .PP The \f[C]display\f[R] 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. .PP Returns \f[C]true\f[R] if the context menu was displayed. .RS .PP \f[I]Note:\f[R] 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 \f[C]ALLEGRO_MOUSE_BUTTON_UP\f[R] events and even then only if that event corresponds to the final mouse button that was pressed. .RE .SH SINCE .PP 5.1.0 .SH SEE ALSO .PP al_create_popup_menu(3alleg5)