config: add touch output mapping configuration

This commit is contained in:
Jens Peters 2024-01-13 00:19:44 +01:00 committed by Johan Malm
parent 42afdf9193
commit 614ce35f31
2 changed files with 11 additions and 0 deletions

View 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;

View 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;