unhilite the entry for the submenu when it is closed

This commit is contained in:
Dana Jansens 2003-07-23 03:58:50 +00:00
parent 3578c18521
commit b6e3e1bc7e

View file

@ -40,11 +40,10 @@ void parse_menu_full(xmlDocPtr doc, xmlNodePtr node, void *data,
g_message("menu label %s", title); g_message("menu label %s", title);
if (parse_attr_string("plugin", node, &plugin)) { if (parse_attr_string("plugin", node, &plugin)) {
PluginMenuCreateData data = { PluginMenuCreateData data;
.doc = doc, data.doc = doc;
.node = node, data.node = node;
.parent = menu data.parent = menu;
};
parent = plugin_create(plugin, &data); parent = plugin_create(plugin, &data);
g_free(plugin); g_free(plugin);
} else } else
@ -367,9 +366,19 @@ void menu_hide(ObMenu *self) {
self->shown = FALSE; self->shown = FALSE;
if (self->open_submenu) if (self->open_submenu)
menu_hide(self->open_submenu); menu_hide(self->open_submenu);
if (self->parent && self->parent->open_submenu == self) if (self->parent && self->parent->open_submenu == self) {
ObMenuEntry *e;
self->parent->open_submenu = NULL; self->parent->open_submenu = NULL;
e = menu_find_entry_by_submenu(self->parent, self);
if (self->parent->mouseover)
self->parent->mouseover(e, FALSE);
else
menu_control_mouseover(e, FALSE);
menu_entry_render(e);
}
if (!(self->parent && self->parent->shown)) { if (!(self->parent && self->parent->shown)) {
grab_keyboard(FALSE); grab_keyboard(FALSE);
grab_pointer(FALSE, None); grab_pointer(FALSE, None);