From 040b451ed0e2487031b15ca518ad4fdf9fefd559 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 21 Jul 2007 23:56:26 -0400 Subject: [PATCH] fix a crash with the focused client closing during the delay of a submenu being shown (and add an assert for this too) --- openbox/menuframe.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openbox/menuframe.c b/openbox/menuframe.c index d2f513c4..2c666e3f 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -1075,8 +1075,14 @@ void menu_frame_hide_all_client(ObClient *client) GList *it = g_list_last(menu_frame_visible); if (it) { ObMenuFrame *f = it->data; - if (f->client == client) + if (f->client == client) { + if (config_submenu_show_delay) { + /* remove any submenu open requests */ + ob_main_loop_timeout_remove(ob_main_loop, + menu_entry_frame_submenu_timeout); + } menu_frame_hide(f); + } } } @@ -1121,6 +1127,7 @@ ObMenuEntryFrame* menu_entry_frame_under(gint x, gint y) static gboolean menu_entry_frame_submenu_timeout(gpointer data) { + g_assert(menu_frame_visible); menu_entry_frame_show_submenu((ObMenuEntryFrame*)data); return FALSE; } -- 2.44.0