aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bind.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-06 08:29:44 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-06 08:33:00 +1000
commit32c7386b0f3dcd9f0138164ce597e34f79cdd1b9 (patch)
tree0df99ee8d973003a2889f81e6e6963430cdeb13f /sway/commands/bind.c
parentMerge pull request #2572 from RedSoxFan/wlr-output-disabling (diff)
downloadsway-32c7386b0f3dcd9f0138164ce597e34f79cdd1b9.tar.gz
sway-32c7386b0f3dcd9f0138164ce597e34f79cdd1b9.tar.zst
sway-32c7386b0f3dcd9f0138164ce597e34f79cdd1b9.zip
Fix management of bindings during reload
seat_execute_command needs to check the flags on `binding_copy`, as `binding` will be a dangling pointer after a reload command. handle_keyboard_key needs to set the next_repeat_binding for non-reloads prior to executing the command in case the binding is freed by the reload command.
Diffstat (limited to 'sway/commands/bind.c')
-rw-r--r--sway/commands/bind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 5b56ba30..047018e0 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -329,7 +329,7 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding)
329 binding->command, results->error); 329 binding->command, results->error);
330 } 330 }
331 331
332 if (binding->flags & BINDING_RELOAD) { // free the binding if we made a copy 332 if (binding_copy->flags & BINDING_RELOAD) {
333 free_sway_binding(binding_copy); 333 free_sway_binding(binding_copy);
334 } 334 }
335 free_cmd_results(results); 335 free_cmd_results(results);