#define FRAME_EVENTMASK (ButtonPressMask |ButtonMotionMask | EnterWindowMask |\
LeaveWindowMask)
#define ENTRY_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
- ButtonPressMask | ButtonReleaseMask)
+ ButtonPressMask | ButtonReleaseMask | \
+ PointerMotionMask)
GList *menu_frame_visible;
GHashTable *menu_frame_map;
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);
if (self->selected->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) {
/* only show if the submenu isn't already showing */
if (oldchild_entry != self->selected) {
- if (immediate || config_submenu_hide_delay == 0)
+ if (immediate || config_submenu_show_delay == 0)
menu_entry_frame_show_submenu(self->selected);
- else if (config_submenu_hide_delay > 0) {
+ else if (config_submenu_show_delay > 0) {
if (submenu_show_timer)
g_source_remove(submenu_show_timer);
submenu_show_timer =
/* 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)