diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/keyboard/keyboard.c | 7 | ||||
| -rw-r--r-- | plugins/menu/fifo_menu.c | 13 | ||||
| -rw-r--r-- | plugins/mouse/mouse.c | 2 | ||||
| -rw-r--r-- | plugins/placement/history.c | 4 |
4 files changed, 20 insertions, 6 deletions
diff --git a/plugins/keyboard/keyboard.c b/plugins/keyboard/keyboard.c index 5ffb3ef5..33f8409e 100644 --- a/plugins/keyboard/keyboard.c +++ b/plugins/keyboard/keyboard.c @@ -69,7 +69,7 @@ static void parse_key(xmlDocPtr doc, xmlNodePtr node, GList *keylist) static void parse_xml(xmlDocPtr doc, xmlNodePtr node, void *d) { - parse_key(doc, node, NULL); + parse_key(doc, node->xmlChildrenNode, NULL); } void plugin_setup_config() @@ -249,6 +249,11 @@ static void event(ObEvent *e, void *foo) grabbed_key = p; } + if (act->func == action_showmenu) { + act->data.showmenu.x = e->data.x.e->xkey.x_root; + act->data.showmenu.y = e->data.x.e->xkey.y_root; + } + act->data.any.c = focus_client; act->func(&act->data); } diff --git a/plugins/menu/fifo_menu.c b/plugins/menu/fifo_menu.c index 71326225..3443294e 100644 --- a/plugins/menu/fifo_menu.c +++ b/plugins/menu/fifo_menu.c @@ -133,6 +133,11 @@ void plugin_destroy (ObMenu *m) FIFO_MENU_DATA(m)->fifo = NULL; } + if (FIFO_MENU_DATA(m)->buf != NULL) { + g_free(FIFO_MENU_DATA(m)->buf); + FIFO_MENU_DATA(m)->buf = NULL; + } + g_free(m->plugin_data); menu_free(m->name); @@ -162,9 +167,11 @@ void *plugin_create(PluginMenuCreateData *data) m = menu_new( (label != NULL ? label : ""), (id != NULL ? id : PLUGIN_NAME), data->parent); - menu_add_entry(data->parent, menu_entry_new_submenu( - (label != NULL ? label : ""), - m)); + + if (data->parent) + menu_add_entry(data->parent, menu_entry_new_submenu( + (label != NULL ? label : ""), + m)); g_free(label); g_free(id); diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c index 91ff7c4b..6ac7bab0 100644 --- a/plugins/mouse/mouse.c +++ b/plugins/mouse/mouse.c @@ -31,6 +31,8 @@ static void parse_xml(xmlDocPtr doc, xmlNodePtr node, void *d) MouseAction mact; Action *action; + node = node->xmlChildrenNode; + if ((n = parse_find_node("dragThreshold", node))) threshold = parse_int(doc, n); if ((n = parse_find_node("doubleClickTime", node))) diff --git a/plugins/placement/history.c b/plugins/placement/history.c index eeff1f63..27efa677 100644 --- a/plugins/placement/history.c +++ b/plugins/placement/history.c @@ -181,7 +181,7 @@ static void save_history() xmlIndentTreeOutput = 1; xmlSaveFormatFile(history_path, doc, 1); - xmlFree(doc); + xmlFreeDoc(doc); } static void load_history() @@ -236,7 +236,7 @@ static void load_history() g_free(name); g_free(class); g_free(role); node = parse_find_node("entry", node->next); } - xmlFree(doc); + xmlFreeDoc(doc); } void history_startup() |
