Ensure format of dumped bindings for i3bar is compatible with i3 bindings.

fixes #1695
This commit is contained in:
Ingo Bürk
2015-05-23 16:48:29 -04:00
parent f0ac9629b9
commit 9eb255d5fa
6 changed files with 96 additions and 57 deletions

View File

@ -470,12 +470,12 @@ void handle_button(xcb_button_press_event_t *event) {
/* If a custom command was specified for this mouse button, it overrides
* the default behavior. */
mouse_command_t *command;
TAILQ_FOREACH(command, &(config.mouse_commands), commands) {
if (command->button != event->detail)
binding_t *binding;
TAILQ_FOREACH(binding, &(config.bindings), bindings) {
if (binding->input_code != event->detail)
continue;
i3_send_msg(I3_IPC_MESSAGE_TYPE_COMMAND, command->command);
i3_send_msg(I3_IPC_MESSAGE_TYPE_COMMAND, binding->command);
return;
}