#include <gtk/gtk.h>

int
main (int argc, char **argv)
{
  GtkWidget *menu;
  GtkWidget *item;

  gtk_init (&argc, &argv);

  menu = gtk_menu_new ();
  g_signal_connect (menu, "deactivate", G_CALLBACK (gtk_main_quit), 0);
  gtk_container_set_border_width (GTK_CONTAINER (menu), 42);

  item = gtk_menu_item_new_with_label ("Click me");
  gtk_widget_show (item);
  gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);

  gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0,
		  GDK_CURRENT_TIME);

  gtk_main ();

  return 0;
}
