sway: add bindgesture command

Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
This commit is contained in:
Florian Franzen 2022-04-23 10:27:47 +02:00 committed by Simon Ser
parent a535ed310f
commit cab2189aa6
17 changed files with 1188 additions and 87 deletions

View file

@ -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;