X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fkeyboard.c;h=ccfe04977c755ec23ef29815a6dde78be06bb9be;hb=a6f52b90551621316a36f7cd7b20ef1d5dca0782;hp=1509f69f11a8dfe2c5acb6a0987796e47e6bbf4e;hpb=cb030c6f3a6f464cacd46d970ab28c532df84104;p=chaz%2Fopenbox diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 1509f69f..ccfe0497 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -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 */