diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2017-02-10 10:30:38 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2017-02-13 08:28:37 +1000 |
commit | 019f1851076c267002bf11673af69b5a0d48a301 (patch) | |
tree | e595418dfe27476e684008aaa443cec47e393837 /src/libinput-util.c | |
parent | be30b28a1278190197f60c80821ba74602d09dac (diff) |
touchpad: add a hwdb quirk for (external) touchpad/keyboard combos
Specify the layout of the combo so we know when to initialize palm detection.
This allows us to drop palm detection on external touchpads otherwise,
replacing the wacom-specific check with something more generic..
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/libinput-util.c')
-rw-r--r-- | src/libinput-util.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libinput-util.c b/src/libinput-util.c index d75955cf..351bbe4a 100644 --- a/src/libinput-util.c +++ b/src/libinput-util.c @@ -336,6 +336,30 @@ parse_switch_reliability_property(const char *prop, } /** + * Parses a string with the allowed values: "below" + * The value refers to the position of the touchpad (relative to the + * keyboard, i.e. your average laptop would be 'below') + * + * @param prop The value of the property + * @param layout The layout + * @return true on success, false otherwise + */ +bool +parse_tpkbcombo_layout_poperty(const char *prop, + enum tpkbcombo_layout *layout) +{ + if (!prop) + return false; + + if (streq(prop, "below")) { + *layout = TPKBCOMBO_LAYOUT_BELOW; + return true; + } + + return false; +} + +/** * Return the next word in a string pointed to by state before the first * separator character. Call repeatedly to tokenize a whole string. * |