aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config/input.c')
-rw-r--r--sway/config/input.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sway/config/input.c b/sway/config/input.c
index d649d34d..63c28635 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -8,13 +8,13 @@
8struct input_config *new_input_config(const char* identifier) { 8struct input_config *new_input_config(const char* identifier) {
9 struct input_config *input = calloc(1, sizeof(struct input_config)); 9 struct input_config *input = calloc(1, sizeof(struct input_config));
10 if (!input) { 10 if (!input) {
11 wlr_log(WLR_DEBUG, "Unable to allocate input config"); 11 sway_log(SWAY_DEBUG, "Unable to allocate input config");
12 return NULL; 12 return NULL;
13 } 13 }
14 wlr_log(WLR_DEBUG, "new_input_config(%s)", identifier); 14 sway_log(SWAY_DEBUG, "new_input_config(%s)", identifier);
15 if (!(input->identifier = strdup(identifier))) { 15 if (!(input->identifier = strdup(identifier))) {
16 free(input); 16 free(input);
17 wlr_log(WLR_DEBUG, "Unable to allocate input config"); 17 sway_log(SWAY_DEBUG, "Unable to allocate input config");
18 return NULL; 18 return NULL;
19 } 19 }
20 20
@@ -136,7 +136,7 @@ static void merge_wildcard_on_all(struct input_config *wildcard) {
136 for (int i = 0; i < config->input_configs->length; i++) { 136 for (int i = 0; i < config->input_configs->length; i++) {
137 struct input_config *ic = config->input_configs->items[i]; 137 struct input_config *ic = config->input_configs->items[i];
138 if (strcmp(wildcard->identifier, ic->identifier) != 0) { 138 if (strcmp(wildcard->identifier, ic->identifier) != 0) {
139 wlr_log(WLR_DEBUG, "Merging input * config on %s", ic->identifier); 139 sway_log(SWAY_DEBUG, "Merging input * config on %s", ic->identifier);
140 merge_input_config(ic, wildcard); 140 merge_input_config(ic, wildcard);
141 } 141 }
142 } 142 }
@@ -151,16 +151,16 @@ struct input_config *store_input_config(struct input_config *ic) {
151 int i = list_seq_find(config->input_configs, input_identifier_cmp, 151 int i = list_seq_find(config->input_configs, input_identifier_cmp,
152 ic->identifier); 152 ic->identifier);
153 if (i >= 0) { 153 if (i >= 0) {
154 wlr_log(WLR_DEBUG, "Merging on top of existing input config"); 154 sway_log(SWAY_DEBUG, "Merging on top of existing input config");
155 struct input_config *current = config->input_configs->items[i]; 155 struct input_config *current = config->input_configs->items[i];
156 merge_input_config(current, ic); 156 merge_input_config(current, ic);
157 free_input_config(ic); 157 free_input_config(ic);
158 ic = current; 158 ic = current;
159 } else if (!wildcard) { 159 } else if (!wildcard) {
160 wlr_log(WLR_DEBUG, "Adding non-wildcard input config"); 160 sway_log(SWAY_DEBUG, "Adding non-wildcard input config");
161 i = list_seq_find(config->input_configs, input_identifier_cmp, "*"); 161 i = list_seq_find(config->input_configs, input_identifier_cmp, "*");
162 if (i >= 0) { 162 if (i >= 0) {
163 wlr_log(WLR_DEBUG, "Merging on top of input * config"); 163 sway_log(SWAY_DEBUG, "Merging on top of input * config");
164 struct input_config *current = new_input_config(ic->identifier); 164 struct input_config *current = new_input_config(ic->identifier);
165 merge_input_config(current, config->input_configs->items[i]); 165 merge_input_config(current, config->input_configs->items[i]);
166 merge_input_config(current, ic); 166 merge_input_config(current, ic);
@@ -170,11 +170,11 @@ struct input_config *store_input_config(struct input_config *ic) {
170 list_add(config->input_configs, ic); 170 list_add(config->input_configs, ic);
171 } else { 171 } else {
172 // New wildcard config. Just add it 172 // New wildcard config. Just add it
173 wlr_log(WLR_DEBUG, "Adding input * config"); 173 sway_log(SWAY_DEBUG, "Adding input * config");
174 list_add(config->input_configs, ic); 174 list_add(config->input_configs, ic);
175 } 175 }
176 176
177 wlr_log(WLR_DEBUG, "Config stored for input %s", ic->identifier); 177 sway_log(SWAY_DEBUG, "Config stored for input %s", ic->identifier);
178 178
179 return ic; 179 return ic;
180} 180}