]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
place the client menu at the top left of the window when opening it with a key binding.
[chaz/openbox] / openbox / event.c
index 9d6ff5fd86f09d8ee9ac24326d84411c10a98347..10b7816c20bff71778edeb2ee5265ef21e3b177e 100644 (file)
@@ -52,6 +52,9 @@
 #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
@@ -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;
This page took 0.025268 seconds and 4 git commands to generate.