#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h> /* for usleep() */
+#endif
#ifdef XKB
# include <X11/XKBlib.h>
#endif
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;