]> Dogcows Code - chaz/openbox/blobdiff - openbox/keyboard.c
better menu keyboard handling.
[chaz/openbox] / openbox / keyboard.c
index 1509f69f11a8dfe2c5acb6a0987796e47e6bbf4e..ccfe04977c755ec23ef29815a6dde78be06bb9be 100644 (file)
@@ -27,6 +27,7 @@
 #include "client.h"
 #include "action.h"
 #include "prop.h"
+#include "menuframe.h"
 #include "config.h"
 #include "keytree.h"
 #include "keyboard.h"
@@ -297,6 +298,10 @@ void keyboard_event(ObClient *client, const XEvent *e)
         if (p->key == e->xkey.keycode &&
             p->state == e->xkey.state)
         {
+            /* if we hit a key binding, then close any open menus and run it */
+            if (menu_frame_visible)
+                menu_frame_hide_all();
+
             if (p->first_child != NULL) { /* part of a chain */
                 ob_main_loop_timeout_remove(ob_main_loop, chain_timeout);
                 /* 3 second timeout for chains */
This page took 0.024078 seconds and 4 git commands to generate.