Merge pull request #2578 from RyanDwyer/fix-binding-reload
Fix management of bindings during reload
This commit is contained in:
commit
bea9f9c63f
|
@ -329,7 +329,7 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding)
|
||||||
binding->command, results->error);
|
binding->command, results->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (binding->flags & BINDING_RELOAD) { // free the binding if we made a copy
|
if (binding_copy->flags & BINDING_RELOAD) {
|
||||||
free_sway_binding(binding_copy);
|
free_sway_binding(binding_copy);
|
||||||
}
|
}
|
||||||
free_cmd_results(results);
|
free_cmd_results(results);
|
||||||
|
|
|
@ -278,12 +278,11 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) {
|
||||||
raw_modifiers, false, input_inhibited);
|
raw_modifiers, false, input_inhibited);
|
||||||
|
|
||||||
if (binding_pressed) {
|
if (binding_pressed) {
|
||||||
seat_execute_command(seat, binding_pressed);
|
|
||||||
handled = true;
|
|
||||||
|
|
||||||
if ((binding_pressed->flags & BINDING_RELOAD) == 0) {
|
if ((binding_pressed->flags & BINDING_RELOAD) == 0) {
|
||||||
next_repeat_binding = binding_pressed;
|
next_repeat_binding = binding_pressed;
|
||||||
}
|
}
|
||||||
|
seat_execute_command(seat, binding_pressed);
|
||||||
|
handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue