diff --git a/include/config/rcxml.h b/include/config/rcxml.h index d03e4a74..3b09f6d1 100644 --- a/include/config/rcxml.h +++ b/include/config/rcxml.h @@ -89,6 +89,7 @@ struct rcxml { /* graphics tablet */ struct tablet_config { + char *output_name; struct wlr_fbox box; enum rotation rotation; uint16_t button_map_count; diff --git a/src/config/rcxml.c b/src/config/rcxml.c index 8d9408a4..f892d901 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -854,6 +854,8 @@ entry(xmlNode *node, char *nodename, char *content) } else { wlr_log(WLR_ERROR, "Invalid value for "); } + } else if (!strcasecmp(nodename, "mapToOutput.tablet")) { + rc.tablet.output_name = xstrdup(content); } else if (!strcasecmp(nodename, "rotate.tablet")) { rc.tablet.rotation = tablet_parse_rotation(atoi(content)); } else if (!strcasecmp(nodename, "left.area.tablet")) { @@ -1035,6 +1037,8 @@ rcxml_init(void) rc.doubleclick_time = 500; rc.scroll_factor = 1.0; + rc.tablet.output_name = NULL; + rc.tablet.rotation = 0; rc.tablet.box = (struct wlr_fbox){0}; tablet_load_default_button_mappings(); @@ -1550,6 +1554,8 @@ rcxml_finish(void) zfree(m); } + zfree(rc.tablet.output_name); + struct libinput_category *l, *l_tmp; wl_list_for_each_safe(l, l_tmp, &rc.libinput_categories, link) { wl_list_remove(&l->link);