- ObMenuEntryFrame *temp;
- gboolean reselection;
-
-
- if (!oldchild) {
- /* self is the last visible (sub)menu */
- if (self->parent && self->parent_entry != self->parent->selected) {
- /* Legend:
- (config_submenu_hide_delay != 0)
- In the parent menu corresponding entry "A" selected,
- this submenu ('self') shown, cursor moved in the parent
- menu to another entry "B", then cursor moved for the
- first time into this submenu.
- Results:
- parent menu selection is "B" instead of "A",
- */
- temp = self->parent->selected;
- self->parent->selected = self->parent_entry;
- if (temp)
- menu_entry_frame_render(temp);
- menu_entry_frame_render(self->parent_entry);
- }
- remove_submenu_hide_timeout(self->parent);
- }
- else if (oldchild->child) {
- /* self is the (at least) grandparent of the last visible submenu */
- menu_frame_hide(oldchild->child);
- if (temp = oldchild->selected) {
- oldchild->selected = NULL;
- menu_entry_frame_render(temp);
- }
- }
-