* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
- * © 2009-2014 Michael Stapelberg and contributors (see also: LICENSE)
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
*
* bindings.c: Functions for configuring, finding and, running bindings.
*/
*
*/
Binding *configure_binding(const char *bindtype, const char *modifiers, const char *input_code,
- const char *release, const char *whole_window, const char *command, const char *modename) {
+ const char *release, const char *border, const char *whole_window,
+ const char *command, const char *modename) {
Binding *new_binding = scalloc(sizeof(Binding));
DLOG("bindtype %s, modifiers %s, input code %s, release %s\n", bindtype, modifiers, input_code, release);
new_binding->release = (release != NULL ? B_UPON_KEYRELEASE : B_UPON_KEYPRESS);
+ new_binding->border = (border != NULL);
new_binding->whole_window = (whole_window != NULL);
if (strcmp(bindtype, "bindsym") == 0) {
new_binding->input_type = (strncasecmp(input_code, "button", (sizeof("button") - 1)) == 0
state_filtered &= 0xFF;
DLOG("(removed upper 8 bits, state = %d)\n", state_filtered);
- if (xkb_current_group == XkbGroup2Index)
+ if (xkb_current_group == XCB_XKB_GROUP_2)
state_filtered |= BIND_MODE_SWITCH;
DLOG("(checked mode_switch, state %d)\n", state_filtered);
bind->translated_to[bind->number_keycodes - 1] = i;
}
- DLOG("Translated symbol \"%s\" to %d keycode\n", bind->symbol,
- bind->number_keycodes);
+ DLOG("Translated symbol \"%s\" to %d keycode (mods %d)\n", bind->symbol,
+ bind->number_keycodes, bind->mods);
}
}
if (con == NULL)
command = sstrdup(bind->command);
else
- sasprintf(&command, "[con_id=\"%d\"] %s", con, bind->command);
+ sasprintf(&command, "[con_id=\"%p\"] %s", con, bind->command);
Binding *bind_cp = binding_copy(bind);
CommandResult *result = parse_command(command, NULL);