From 614ce35f31c36770b72a63b9d6b7422497c92a3d Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Sat, 13 Jan 2024 00:19:44 +0100 Subject: [PATCH] config: add touch output mapping configuration --- include/config/rcxml.h | 5 +++++ src/config/rcxml.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/include/config/rcxml.h b/include/config/rcxml.h index b545f31a..4dede031 100644 --- a/include/config/rcxml.h +++ b/include/config/rcxml.h @@ -88,6 +88,11 @@ struct rcxml { struct wl_list mousebinds; /* struct mousebind.link */ double scroll_factor; + /* touch tablet */ + struct touch_config { + char *output_name; + } touch; + /* graphics tablet */ struct tablet_config { char *output_name; diff --git a/src/config/rcxml.c b/src/config/rcxml.c index 2028556e..4547422a 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -863,6 +863,8 @@ entry(xmlNode *node, char *nodename, char *content) } else { wlr_log(WLR_ERROR, "Invalid value for "); } + } else if (!strcasecmp(nodename, "mapToOutput.touch")) { + rc.touch.output_name = xstrdup(content); } else if (!strcasecmp(nodename, "mapToOutput.tablet")) { rc.tablet.output_name = xstrdup(content); } else if (!strcasecmp(nodename, "rotate.tablet")) { @@ -1046,6 +1048,8 @@ rcxml_init(void) rc.doubleclick_time = 500; rc.scroll_factor = 1.0; + rc.touch.output_name = NULL; + rc.tablet.output_name = NULL; rc.tablet.rotation = 0; rc.tablet.box = (struct wlr_fbox){0}; @@ -1563,6 +1567,8 @@ rcxml_finish(void) zfree(m); } + zfree(rc.touch.output_name); + zfree(rc.tablet.output_name); struct libinput_category *l, *l_tmp; -- 2.52.0