diff options
author | Florian Franzen <Florian.Franzen@gmail.com> | 2022-04-23 10:27:47 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-05-30 12:20:43 +0200 |
commit | cab2189aa64d04ba79dc2cbf19400435b47cdbd2 (patch) | |
tree | 450ac51fbc75c73ed1dc6728bc05b08366ace785 /sway/config.c | |
parent | a535ed310f756a57129683c9d81c6a65e8338977 (diff) |
sway: add bindgesture command
Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index e4745a5c..8220ece0 100644 --- a/sway/config.c +++ b/sway/config.c @@ -82,6 +82,12 @@ static void free_mode(struct sway_mode *mode) { } list_free(mode->switch_bindings); } + if (mode->gesture_bindings) { + for (int i = 0; i < mode->gesture_bindings->length; i++) { + free_gesture_binding(mode->gesture_bindings->items[i]); + } + list_free(mode->gesture_bindings); + } free(mode); } @@ -222,6 +228,7 @@ static void config_defaults(struct sway_config *config) { if (!(config->current_mode->keycode_bindings = create_list())) goto cleanup; if (!(config->current_mode->mouse_bindings = create_list())) goto cleanup; if (!(config->current_mode->switch_bindings = create_list())) goto cleanup; + if (!(config->current_mode->gesture_bindings = create_list())) goto cleanup; list_add(config->modes, config->current_mode); config->floating_mod = 0; |