1 #include "openbox/actions.h"
2 #include "openbox/menu.h"
9 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
);
10 static void free_func(gpointer options
);
11 static gboolean
run_func(ObActionsData
*data
, gpointer options
);
13 void action_menu_startup()
15 actions_register("Menu",
22 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
)
27 o
= g_new0(Options
, 1);
29 if ((n
= parse_find_node("menu", node
)))
30 o
->name
= parse_string(doc
, n
);
34 static void free_func(gpointer options
)
44 /* Always return FALSE because its not interactive */
45 static gboolean
run_func(ObActionsData
*data
, gpointer options
)
49 /* you cannot call ShowMenu from inside a menu */
50 if (data
->uact
== OB_USER_ACTION_MENU_SELECTION
) return FALSE
;
53 menu_show(o
->name
, data
->x
, data
->y
, data
->button
!= 0, data
->client
);