X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fkeyboard%2Fkeyboard.c;h=22ea5556bcb4b2580a2dd739ab32f54b6e667c61;hb=1d5fa24e4b92fbd2fc16847612a6825ca08d6567;hp=07a9bd513259ebfb0899c653b500913d468546f8;hpb=c473d5f80ac8a92ba4046365769b2b84ed72881d;p=chaz%2Fopenbox diff --git a/plugins/keyboard/keyboard.c b/plugins/keyboard/keyboard.c index 07a9bd51..22ea5556 100644 --- a/plugins/keyboard/keyboard.c +++ b/plugins/keyboard/keyboard.c @@ -6,6 +6,7 @@ #include "tree.h" #include "keyboard.h" #include "keysrc.h" +#include "translate.h" #include void plugin_setup_config() @@ -38,7 +39,8 @@ static void reset_chains() if (grabbed) { grabbed = FALSE; grab_keyboard(FALSE); - } + } else + XAllowEvents(ob_display, AsyncKeyboard, CurrentTime); } gboolean kbind(GList *keylist, Action *action) @@ -100,6 +102,7 @@ static void press(ObEvent *e, void *foo) if (!grabbed) { grab_keyboard(TRUE); grabbed = TRUE; + XAllowEvents(ob_display, AsyncKeyboard, CurrentTime); } curpos = p; } else { @@ -119,13 +122,14 @@ static void press(ObEvent *e, void *foo) p = p->next_sibling; } } - XAllowEvents(ob_display, AsyncKeyboard, e->data.x.e->xkey.time); } void plugin_startup() { dispatch_register(Event_X_KeyPress, (EventHandler)press, NULL); + translate_key("C-g", &reset_state, &reset_key); + keysrc_parse(); }