all repos — openbox @ f53fa1e589589a6ea2a0e91d372d9771fa1cdd04

openbox fork - make it a bit more like ryudo

Fix for when the menu's update function returns FALSE and no menu is shown.

The ObMenuFrame was not being freed, and the child pointer was being left
pointing to the frame that was not visible.
Dana Jansens danakj@orodu.net
commit

f53fa1e589589a6ea2a0e91d372d9771fa1cdd04

parent

fbc3e344cdbb0fc70b960c60153bd86d56b9eb43

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M openbox/menuframe.copenbox/menuframe.c

@@ -1046,8 +1046,11 @@ parent->child = self;

parent->child_entry = parent_entry; } - if (!menu_frame_show(self)) + if (!menu_frame_show(self)) { + parent->child = NULL; + parent->child_entry = NULL; return FALSE; + } menu_frame_place_submenu(self, &x, &y); menu_frame_move_on_screen(self, x, y, &dx, &dy);

@@ -1272,7 +1275,8 @@ self->frame->client);

/* pass our direction on to our child */ f->direction_right = self->frame->direction_right; - menu_frame_show_submenu(f, self->frame, self); + if (!menu_frame_show_submenu(f, self->frame, self)) + menu_frame_free(f); } void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state)