make client-list-menu work too more menu cleanups
Dana Jansens danakj@orodu.net
12 files changed,
171 insertions(+),
126 deletions(-)
M
Makefile.am
→
Makefile.am
@@ -27,11 +27,11 @@ tools/kdetrayproxy/kdetrayproxy
plugin_LTLIBRARIES = \ plugins/placement/placement.la \ - plugins/menu/client_menu.la + plugins/menu/client_menu.la \ + plugins/menu/client_list_menu.la # plugins/menu/timed_menu.la \ # plugins/menu/fifo_menu.la \ # plugins/menu/include_menu.la \ -# plugins/menu/client_list_menu.la if OBCONF bin_PROGRAMS += \
M
openbox/action.c
→
openbox/action.c
@@ -693,7 +693,7 @@ }
return a; } -ObAction *action_parse(xmlDocPtr doc, xmlNodePtr node) +ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) { char *actname; ObAction *act = NULL;@@ -705,8 +705,13 @@ if (act->func == action_execute || act->func == action_restart) {
if ((n = parse_find_node("execute", node->xmlChildrenNode))) act->data.execute.path = parse_string(doc, n); } else if (act->func == action_showmenu) { - if ((n = parse_find_node("menu", node->xmlChildrenNode))) + if ((n = parse_find_node("menu", node->xmlChildrenNode))) { + gchar *plugin; + act->data.showmenu.name = parse_string(doc, n); + if (parse_attr_string("plugin", n, &plugin)) + menu_open_plugin(i, act->data.showmenu.name, plugin); + } } else if (act->func == action_desktop) { if ((n = parse_find_node("desktop", node->xmlChildrenNode))) act->data.desktop.desk = parse_int(doc, n);
M
openbox/action.h
→
openbox/action.h
@@ -137,7 +137,7 @@ action_resize_relative_vert - the delta
*/ ObAction *action_from_string(char *name); -ObAction *action_parse(xmlDocPtr doc, xmlNodePtr node); +ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); void action_free(ObAction *a); /* Execute */
M
openbox/config.c
→
openbox/config.c
@@ -92,7 +92,7 @@ }
if (keylist) { nact = parse_find_node("action", node); while (nact) { - if ((action = action_parse(doc, nact))) { + if ((action = action_parse(i, doc, nact))) { /* validate that its okay for a key binding */ if (action->func == action_moveresize && action->data.moveresize.corner !=@@ -165,7 +165,7 @@ else
goto next_nbut; nact = parse_find_node("action", nbut->xmlChildrenNode); while (nact) { - if ((action = action_parse(doc, nact))) { + if ((action = action_parse(i, doc, nact))) { /* validate that its okay for a mouse binding*/ if (mact == OB_MOUSE_ACTION_MOTION) { if (action->func != action_moveresize ||
M
openbox/event.c
→
openbox/event.c
@@ -1170,13 +1170,14 @@ ObMenuEntryFrame *e;
switch (ev->type) { case ButtonRelease: - if (!(f = menu_frame_under(ev->xmotion.x_root, - ev->xmotion.y_root))) + if (!(f = menu_frame_under(ev->xbutton.x_root, + ev->xbutton.y_root))) menu_frame_hide_all(); else { - if ((e = menu_entry_frame_under(ev->xmotion.x_root, - ev->xmotion.y_root))) - menu_entry_frame_execute(e); + if ((e = menu_entry_frame_under(ev->xbutton.x_root, + ev->xbutton.y_root))) + menu_entry_frame_execute(e, + !(ev->xbutton.state & ControlMask)); } break; case MotionNotify: