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 48bbd1ea..7104f55d 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -56,6 +56,12 @@ static void free_mode(struct sway_mode *mode) { | |||
56 | } | 56 | } |
57 | list_free(mode->mouse_bindings); | 57 | list_free(mode->mouse_bindings); |
58 | } | 58 | } |
59 | if (mode->switch_bindings) { | ||
60 | for (int i = 0; i < mode->switch_bindings->length; i++) { | ||
61 | free_switch_binding(mode->switch_bindings->items[i]); | ||
62 | } | ||
63 | list_free(mode->switch_bindings); | ||
64 | } | ||
59 | free(mode); | 65 | free(mode); |
60 | } | 66 | } |
61 | 67 | ||
@@ -195,6 +201,7 @@ static void config_defaults(struct sway_config *config) { | |||
195 | if (!(config->current_mode->keysym_bindings = create_list())) goto cleanup; | 201 | if (!(config->current_mode->keysym_bindings = create_list())) goto cleanup; |
196 | if (!(config->current_mode->keycode_bindings = create_list())) goto cleanup; | 202 | if (!(config->current_mode->keycode_bindings = create_list())) goto cleanup; |
197 | if (!(config->current_mode->mouse_bindings = create_list())) goto cleanup; | 203 | if (!(config->current_mode->mouse_bindings = create_list())) goto cleanup; |
204 | if (!(config->current_mode->switch_bindings = create_list())) goto cleanup; | ||
198 | list_add(config->modes, config->current_mode); | 205 | list_add(config->modes, config->current_mode); |
199 | 206 | ||
200 | config->floating_mod = 0; | 207 | config->floating_mod = 0; |