aboutsummaryrefslogtreecommitdiff
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index b4352c6a..f696646f 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -389,8 +389,10 @@ void input_manager_set_focus(struct sway_input_manager *input,
void input_manager_apply_input_config(struct sway_input_manager *input,
struct input_config *input_config) {
struct sway_input_device *input_device = NULL;
+ bool wildcard = strcmp(input_config->identifier, "*") == 0;
wl_list_for_each(input_device, &input->devices, link) {
- if (strcmp(input_device->identifier, input_config->identifier) == 0) {
+ if (strcmp(input_device->identifier, input_config->identifier) == 0
+ || wildcard) {
if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) {
input_manager_libinput_config_pointer(input_device);
}
@@ -480,13 +482,16 @@ struct sway_seat *input_manager_get_default_seat(
}
struct input_config *input_device_get_config(struct sway_input_device *device) {
+ struct input_config *wildcard_config = NULL;
struct input_config *input_config = NULL;
for (int i = 0; i < config->input_configs->length; ++i) {
input_config = config->input_configs->items[i];
if (strcmp(input_config->identifier, device->identifier) == 0) {
return input_config;
+ } else if (strcmp(input_config->identifier, "*") == 0) {
+ wildcard_config = input_config;
}
}
- return NULL;
+ return wildcard_config;
}