diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-28 16:52:12 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-28 16:52:12 -0500 |
commit | 0b8481f41af32daf75324fc1f202bce62cc702f4 (patch) | |
tree | bd06e659ecebabc5fb84fb14da1288dd5210b087 /sway/input | |
parent | bindcode (diff) | |
download | sway-0b8481f41af32daf75324fc1f202bce62cc702f4.tar.gz sway-0b8481f41af32daf75324fc1f202bce62cc702f4.tar.zst sway-0b8481f41af32daf75324fc1f202bce62cc702f4.zip |
fix keyboard_execute_bindcode
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/keyboard.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index 2464db12..eacb6ceb 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -183,17 +183,14 @@ static bool keyboard_execute_bindcode(struct sway_keyboard *keyboard) { | |||
183 | list_t *keycode_bindings = config->current_mode->keycode_bindings; | 183 | list_t *keycode_bindings = config->current_mode->keycode_bindings; |
184 | for (int i = 0; i < keycode_bindings->length; ++i) { | 184 | for (int i = 0; i < keycode_bindings->length; ++i) { |
185 | struct sway_binding *binding = keycode_bindings->items[i]; | 185 | struct sway_binding *binding = keycode_bindings->items[i]; |
186 | //bool match = true; | 186 | if (binding_matches_keycodes(wlr_keyboard, binding)) { |
187 | for (int j = 0; j < binding->keys->length; ++j) { | 187 | struct cmd_results *results = handle_command(binding->command); |
188 | if (binding_matches_keycodes(wlr_keyboard, binding)) { | 188 | if (results->status != CMD_SUCCESS) { |
189 | struct cmd_results *results = handle_command(binding->command); | 189 | sway_log(L_DEBUG, "could not run command for binding: %s", |
190 | if (results->status != CMD_SUCCESS) { | 190 | binding->command); |
191 | sway_log(L_DEBUG, "could not run command for binding: %s", | ||
192 | binding->command); | ||
193 | } | ||
194 | free_cmd_results(results); | ||
195 | return true; | ||
196 | } | 191 | } |
192 | free_cmd_results(results); | ||
193 | return true; | ||
197 | } | 194 | } |
198 | } | 195 | } |
199 | 196 | ||