Add click method libinput option (#1416)

<libinput>
  <device>
    <clickMethod>none|buttonAreas|clickfinger</clickMethod>
  </device>
</libinput>
This commit is contained in:
Marvin Dostal 2024-02-21 18:19:48 +01:00 committed by GitHub
parent 17bad48d87
commit 8be9c38460
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 53 additions and 1 deletions

View file

@ -563,6 +563,19 @@ fill_libinput_category(char *nodename, char *content)
current_libinput_category->dwt = ret
? LIBINPUT_CONFIG_DWT_ENABLED
: LIBINPUT_CONFIG_DWT_DISABLED;
} else if (!strcasecmp(nodename, "clickMethod")) {
if (!strcasecmp(content, "none")) {
current_libinput_category->click_method =
LIBINPUT_CONFIG_CLICK_METHOD_NONE;
} else if (!strcasecmp(content, "clickfinger")) {
current_libinput_category->click_method =
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
} else if (!strcasecmp(content, "buttonAreas")) {
current_libinput_category->click_method =
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
} else {
wlr_log(WLR_ERROR, "invalid clickMethod");
}
}
}