projects
/
dana
/
openbox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for when the menu's update function returns FALSE and no menu is shown.
[dana/openbox.git]
/
openbox
/
menuframe.c
diff --git
a/openbox/menuframe.c
b/openbox/menuframe.c
index
6110045
..
4887173
100644
(file)
--- a/
openbox/menuframe.c
+++ b/
openbox/menuframe.c
@@
-1046,8
+1046,11
@@
gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent,
parent->child_entry = parent_entry;
}
parent->child_entry = parent_entry;
}
- if (!menu_frame_show(self))
+ if (!menu_frame_show(self)) {
+ parent->child = NULL;
+ parent->child_entry = NULL;
return FALSE;
return FALSE;
+ }
menu_frame_place_submenu(self, &x, &y);
menu_frame_move_on_screen(self, x, y, &dx, &dy);
menu_frame_place_submenu(self, &x, &y);
menu_frame_move_on_screen(self, x, y, &dx, &dy);
@@
-1272,7
+1275,8
@@
void menu_entry_frame_show_submenu(ObMenuEntryFrame *self)
/* pass our direction on to our child */
f->direction_right = self->frame->direction_right;
/* 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)
}
void menu_entry_frame_execute(ObMenuEntryFrame *self, guint state)