#include "../../kernel/focus.h"
#include "../../kernel/dispatch.h"
#include "../../kernel/openbox.h"
+#include "../../kernel/event.h"
#include "../../kernel/grab.h"
#include "../../kernel/action.h"
#include "tree.h"
#include "keyboard.h"
#include "keysrc.h"
+#include "translate.h"
#include <glib.h>
void plugin_setup_config()
if (grabbed) {
grabbed = FALSE;
grab_keyboard(FALSE);
- }
+ } else
+ XAllowEvents(ob_display, AsyncKeyboard, event_lasttime);
}
gboolean kbind(GList *keylist, Action *action)
g_assert(keylist != NULL);
g_assert(action != NULL);
- if (!(tree = tree_build(keylist))) {
- g_warning("invalid binding");
+ if (!(tree = tree_build(keylist)))
return FALSE;
- }
if ((t = tree_find(tree, &conflict)) != NULL) {
/* already bound to something */
g_warning("keychain is already bound");
if (!grabbed) {
grab_keyboard(TRUE);
grabbed = TRUE;
+ XAllowEvents(ob_display, AsyncKeyboard,
+ event_lasttime);
}
curpos = p;
} else {
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();
}