diff options
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) { | |||
82 | } | 82 | } |
83 | list_free(mode->switch_bindings); | 83 | list_free(mode->switch_bindings); |
84 | } | 84 | } |
85 | if (mode->gesture_bindings) { | ||
86 | for (int i = 0; i < mode->gesture_bindings->length; i++) { | ||
87 | free_gesture_binding(mode->gesture_bindings->items[i]); | ||
88 | } | ||
89 | list_free(mode->gesture_bindings); | ||
90 | } | ||
85 | free(mode); | 91 | free(mode); |
86 | } | 92 | } |
87 | 93 | ||
@@ -222,6 +228,7 @@ static void config_defaults(struct sway_config *config) { | |||
222 | if (!(config->current_mode->keycode_bindings = create_list())) goto cleanup; | 228 | if (!(config->current_mode->keycode_bindings = create_list())) goto cleanup; |
223 | if (!(config->current_mode->mouse_bindings = create_list())) goto cleanup; | 229 | if (!(config->current_mode->mouse_bindings = create_list())) goto cleanup; |
224 | if (!(config->current_mode->switch_bindings = create_list())) goto cleanup; | 230 | if (!(config->current_mode->switch_bindings = create_list())) goto cleanup; |
231 | if (!(config->current_mode->gesture_bindings = create_list())) goto cleanup; | ||
225 | list_add(config->modes, config->current_mode); | 232 | list_add(config->modes, config->current_mode); |
226 | 233 | ||
227 | config->floating_mod = 0; | 234 | config->floating_mod = 0; |