+
+ if (oldchild) {
+ /* there is an open submenu */
+
+ if (config_submenu_show_delay && !immediate) {
+ if (old == self->open_submenu) {
+ /* close the open submenu after a delay if we don't have
+ it selected */
+ ob_main_loop_timeout_remove
+ (ob_main_loop,
+ menu_entry_frame_submenu_hide_timeout);
+ ob_main_loop_timeout_add(ob_main_loop,
+ config_submenu_show_delay * 1000,
+ menu_entry_frame_submenu_hide_timeout,
+ self->child, g_direct_equal,
+ NULL);
+ }
+ }
+ else
+ menu_frame_hide(oldchild);
+ }