From: Jens Peters Date: Fri, 12 Jan 2024 23:19:44 +0000 (+0100) Subject: config: add touch output mapping configuration X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=614ce35f31c36770b72a63b9d6b7422497c92a3d;p=proto%2Flabwc.git config: add touch output mapping configuration --- 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;