]> git.mdlowis.com Git - proto/labwc.git/commitdiff
config: add touch output mapping configuration
authorJens Peters <jp7677@gmail.com>
Fri, 12 Jan 2024 23:19:44 +0000 (00:19 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 13 Jan 2024 22:18:20 +0000 (22:18 +0000)
include/config/rcxml.h
src/config/rcxml.c

index b545f31aef31d621f14d5687788b21f480c3cfd3..4dede03192dab49ffce1f4b3c710ba94cb2dda7b 100644 (file)
@@ -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;
index 2028556e29c1f5be738203fc5deca461cdb59dfd..4547422a7537920c39295e59d533ef13ea7bbdbe 100644 (file)
@@ -863,6 +863,8 @@ entry(xmlNode *node, char *nodename, char *content)
                } else {
                        wlr_log(WLR_ERROR, "Invalid value for <resize popupShow />");
                }
+       } 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;