From: Simon Long Date: Tue, 29 Apr 2025 08:18:17 +0000 (+0100) Subject: Parse touch configs in reverse order to enable overriding X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=b97b2973df35856479ddb193d2544de5685fb8f7;p=proto%2Flabwc.git Parse touch configs in reverse order to enable overriding Also reverse searching of default configs --- 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;