X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;fp=openbox%2Fmenuframe.c;h=91e7c53ef58397bcd5a2720146842fcafe41e7e9;hb=3fd74abb3c2969f170d727154245cde3ef8a4b87;hp=9127257e010ee69e384f90da0eb61e32af93d17c;hpb=523a726c6c2f31da36a0af985d22f3792a8c09b5;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 9127257e..91e7c53e 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1061,14 +1061,15 @@ gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent, static void menu_frame_hide(ObMenuFrame *self) { + ObMenu *const menu = self->menu; GList *it = g_list_find(menu_frame_visible, self); gulong ignore_start; if (!it) return; - if (self->menu->hide_func) - self->menu->hide_func(self, self->menu->data); + if (menu->hide_func) + menu->hide_func(self, menu->data); if (self->child) menu_frame_hide(self->child); @@ -1095,6 +1096,9 @@ static void menu_frame_hide(ObMenuFrame *self) event_end_ignore_all_enters(ignore_start); menu_frame_free(self); + + if (menu->cleanup_func) + menu->cleanup_func(menu, menu->data); } void menu_frame_hide_all(void)