X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fkeyboard.c;h=bcac0a3c3220ae0d38b8403cf9358371f087d2b3;hb=0844866bbd05ea6673f64f23f729d9a43fe041b8;hp=513b6e1e30785dd2a63f7d9a2ea531ad66fe81d2;hpb=a9ce3ba2663177b002a676a140dc512f41ba2263;p=chaz%2Fopenbox diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 513b6e1e..bcac0a3c 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -8,6 +8,7 @@ #include "action.h" #include "prop.h" #include "timer.h" +#include "config.h" #include "keytree.h" #include "keyboard.h" #include "translate.h" @@ -36,6 +37,10 @@ static void grab_for_window(Window win, gboolean grab) grab_key(p->key, p->state, win, GrabModeAsync); p = p->next_sibling; } + if (curpos) + grab_key(config_keyboard_reset_keycode, + config_keyboard_reset_state, + win, GrabModeAsync); } } @@ -179,6 +184,13 @@ void keyboard_event(ObClient *client, const XEvent *e) g_assert(e->type == KeyPress); + if (e->xkey.keycode == config_keyboard_reset_keycode && + e->xkey.state == config_keyboard_reset_state) + { + keyboard_reset_chains(); + return; + } + if (curpos == NULL) p = keyboard_firstnode; else @@ -232,10 +244,8 @@ void keyboard_event(ObClient *client, const XEvent *e) if (act->func == action_showmenu) { - act->data.showmenu.x = - e->xkey.x_root; - act->data.showmenu.y = - e->xkey.y_root; + act->data.showmenu.x = e->xkey.x_root; + act->data.showmenu.y = e->xkey.y_root; } act->data.any.c = client;