From b97b2973df35856479ddb193d2544de5685fb8f7 Mon Sep 17 00:00:00 2001 From: Simon Long Date: Tue, 29 Apr 2025 09:18:17 +0100 Subject: [PATCH] Parse touch configs in reverse order to enable overriding Also reverse searching of default configs --- src/config/touch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/touch.c b/src/config/touch.c index 2c93d8f3..0ff530e8 100644 --- a/src/config/touch.c +++ b/src/config/touch.c @@ -9,7 +9,7 @@ static struct touch_config_entry * find_default_config(void) { struct touch_config_entry *entry; - wl_list_for_each(entry, &rc.touch_configs, link) { + wl_list_for_each_reverse(entry, &rc.touch_configs, link) { if (!entry->device_name) { wlr_log(WLR_INFO, "found default touch configuration"); return entry; @@ -23,7 +23,7 @@ touch_find_config_for_device(char *device_name) { wlr_log(WLR_INFO, "find touch configuration for %s", device_name); struct touch_config_entry *entry; - wl_list_for_each(entry, &rc.touch_configs, link) { + wl_list_for_each_reverse(entry, &rc.touch_configs, link) { if (entry->device_name && !strcasecmp(entry->device_name, device_name)) { wlr_log(WLR_INFO, "found touch configuration for %s", device_name); return entry; -- 2.52.0