aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-07-24 19:48:27 +1000
committerGitHub <noreply@github.com>2018-07-24 19:48:27 +1000
commit1a9179dbab91490c4a8dc45f8630ac139c96efe6 (patch)
tree429de47906f0ba1f114689c48cbabc5be8bb6e71 /sway/config.c
parent6ccf2a2c66c1264450a4b3ab3dd344e1b3b44ca3 (diff)
parente02a6718c2c7313309b45e499034d614ee6207fc (diff)
downloadsway-1a9179dbab91490c4a8dc45f8630ac139c96efe6.tar.xz
Merge pull request #2303 from frsfnrrg/mouse-bindings
Implement mouse bindings
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index ed624bfa..c2310ff7 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -56,6 +56,12 @@ static void free_mode(struct sway_mode *mode) {
}
list_free(mode->keycode_bindings);
}
+ if (mode->mouse_bindings) {
+ for (i = 0; i < mode->mouse_bindings->length; i++) {
+ free_sway_binding(mode->mouse_bindings->items[i]);
+ }
+ list_free(mode->mouse_bindings);
+ }
free(mode);
}
@@ -172,6 +178,7 @@ static void config_defaults(struct sway_config *config) {
strcpy(config->current_mode->name, "default");
if (!(config->current_mode->keysym_bindings = create_list())) goto cleanup;
if (!(config->current_mode->keycode_bindings = create_list())) goto cleanup;
+ if (!(config->current_mode->mouse_bindings = create_list())) goto cleanup;
list_add(config->modes, config->current_mode);
config->floating_mod = 0;