X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=b49a221beeab41e20a60f52f152aad8b050404a4;hb=c1d21a1a6d88189ab3c5569b2b776d846bb6c11a;hp=6110045cc459dd2596781242c90c4be3d72b2d93;hpb=d09fd3183e6a52c63fcfdcf62d418cfdccb0015b;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 6110045c..b49a221b 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); @@ -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)