X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fevent.c;h=10b7816c20bff71778edeb2ee5265ef21e3b177e;hb=26879183e96f5a0d981e6ae76fda82a0d4564b20;hp=9d6ff5fd86f09d8ee9ac24326d84411c10a98347;hpb=5d5be2ba2a6e0b3886e0076475ed9d7a2d4ac9ab;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 9d6ff5fd..10b7816c 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -52,6 +52,9 @@ #ifdef HAVE_SIGNAL_H # include #endif +#ifdef HAVE_UNISTD_H +# include /* for usleep() */ +#endif #ifdef XKB # include #endif @@ -1328,7 +1331,8 @@ static void event_handle_menu_shortcut(XEvent *ev) ObMenuEntryFrame *e = it->data; gunichar entrykey = 0; - if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL) + if (e->entry->type == OB_MENU_ENTRY_TYPE_NORMAL && + e->entry->data.normal.enabled) entrykey = e->entry->data.normal.shortcut; else if (e->entry->type == OB_MENU_ENTRY_TYPE_SUBMENU) entrykey = e->entry->data.submenu.submenu->shortcut;