Revert "Fix the delayed hiding of submenus, so that they don't end up hidden while the entry is selected"
This reverts commit 8ada991d82
.
This commit is contained in:
parent
775f60852a
commit
15802d87b1
1 changed files with 4 additions and 10 deletions
|
@ -1161,8 +1161,6 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!entry && self->open_submenu) {
|
if (!entry && self->open_submenu) {
|
||||||
/* we moved out of the menu, so move the selection back to the open
|
|
||||||
submenu */
|
|
||||||
entry = self->open_submenu;
|
entry = self->open_submenu;
|
||||||
oldchild = NULL;
|
oldchild = NULL;
|
||||||
|
|
||||||
|
@ -1180,16 +1178,12 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry,
|
||||||
/* there is an open submenu */
|
/* there is an open submenu */
|
||||||
|
|
||||||
if (config_submenu_show_delay && !immediate) {
|
if (config_submenu_show_delay && !immediate) {
|
||||||
if (entry == self->open_submenu) {
|
if (old == self->open_submenu) {
|
||||||
/* we moved onto the entry that has an open submenu, so stop
|
/* close the open submenu after a delay if we don't have
|
||||||
trying to close the submenu */
|
it selected */
|
||||||
ob_main_loop_timeout_remove
|
ob_main_loop_timeout_remove
|
||||||
(ob_main_loop,
|
(ob_main_loop,
|
||||||
menu_entry_frame_submenu_hide_timeout);
|
menu_entry_frame_submenu_hide_timeout);
|
||||||
}
|
|
||||||
else if (old == self->open_submenu) {
|
|
||||||
/* we just moved off the entry with an open submenu, so
|
|
||||||
close the open submenu after a delay */
|
|
||||||
ob_main_loop_timeout_add(ob_main_loop,
|
ob_main_loop_timeout_add(ob_main_loop,
|
||||||
config_submenu_show_delay * 1000,
|
config_submenu_show_delay * 1000,
|
||||||
menu_entry_frame_submenu_hide_timeout,
|
menu_entry_frame_submenu_hide_timeout,
|
||||||
|
@ -1204,7 +1198,7 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry,
|
||||||
if (self->selected) {
|
if (self->selected) {
|
||||||
menu_entry_frame_render(self->selected);
|
menu_entry_frame_render(self->selected);
|
||||||
|
|
||||||
/* if we've selected a submenu and it wasn't already open, then
|
/* if we've selected a submenu and it wasn't always open, then
|
||||||
show it */
|
show it */
|
||||||
if (self->selected->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU &&
|
if (self->selected->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU &&
|
||||||
self->selected != self->open_submenu)
|
self->selected != self->open_submenu)
|
||||||
|
|
Loading…
Reference in a new issue