X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=3252bb3c76a2ae115e55728000eaaed5c01ffd5c;hb=HEAD;hp=6110045cc459dd2596781242c90c4be3d72b2d93;hpb=d09fd3183e6a52c63fcfdcf62d418cfdccb0015b;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 6110045c..3252bb3c 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -38,7 +38,8 @@ #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; @@ -1046,8 +1047,11 @@ gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent, 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); @@ -1238,9 +1242,9 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry, 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 = @@ -1272,7 +1276,8 @@ void menu_entry_frame_show_submenu(ObMenuEntryFrame *self) /* 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)