From 9d42df6ab4099c9365d3631ea86348a8f21752a0 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 1 Sep 2003 02:02:40 +0000 Subject: add urgent actions add some macros for moving/resizing clients add 'vibrate' action --- openbox/config.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'openbox/config.c') diff --git a/openbox/config.c b/openbox/config.c index 21f03d3e..20950603 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -40,6 +40,8 @@ GSList *config_menu_files; gint config_resist_win; gint config_resist_edge; +GSList *config_urgent_actions; + /* @@ -352,6 +354,33 @@ static void parse_resistance(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, config_resist_edge = parse_int(doc, n); } +static void parse_urgent(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, + void *d) +{ + ObAction *action; + xmlNodePtr nact; + + nact = parse_find_node("action", node->xmlChildrenNode); + while (nact) { + if ((action = action_parse(i, doc, nact))) { + /* validate that its okay for an urgent binding */ + if (action->func == action_moveresize && + action->data.moveresize.corner != + prop_atoms.net_wm_moveresize_move_keyboard && + action->data.moveresize.corner != + prop_atoms.net_wm_moveresize_size_keyboard) { + action_free(action); + action = NULL; + } + + if (action) + config_urgent_actions = g_slist_append(config_urgent_actions, + action); + } + nact = parse_find_node("action", nact->next); + } +} + void config_startup(ObParseInst *i) { config_focus_new = TRUE; @@ -405,6 +434,8 @@ void config_startup(ObParseInst *i) config_menu_files = NULL; parse_register(i, "menu", parse_menu, NULL); + + parse_register(i, "urgent", parse_urgent, NULL); } void config_shutdown() -- cgit v1.2.3