From e82728ca2773d297d9103b14edceff1a9c12833e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Jul 2014 11:15:43 +1000 Subject: [PATCH 1/2] Fix two doxygen errors Add the config status enum to the config doxygen group, and remove a superfluous argument for an @ingroup command. Signed-off-by: Peter Hutterer --- src/libinput.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libinput.h b/src/libinput.h index 0d4b79cb..7d33f2b2 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -1417,6 +1417,11 @@ libinput_device_get_size(struct libinput_device *device, * in the right order. */ +/** + * @ingroup config + * + * Status codes returned when applying configuration settings. + */ enum libinput_config_status { LIBINPUT_CONFIG_STATUS_SUCCESS = 0, /**< Config applied successfully */ LIBINPUT_CONFIG_STATUS_UNSUPPORTED, /**< Configuration not available on @@ -1425,7 +1430,7 @@ enum libinput_config_status { }; /** - * @ingroup config Device configuration + * @ingroup config * * Return a string describing the error. * From fc320c1dd17d636a83849008eb12a6dcc101cbcd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 21 Jul 2014 11:27:21 +1000 Subject: [PATCH 2/2] touchpad: always init the left/right palm edge to INT_MIN/MAX A touchpad without resolution support had the values set to 0, disabling pointer movement. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 1636e7a2..5db204f6 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -754,6 +754,9 @@ tp_init_palmdetect(struct tp_dispatch *tp, { int width; + tp->palm.right_edge = INT_MAX; + tp->palm.left_edge = INT_MIN; + /* We don't know how big the touchpad is */ if (device->abs.absinfo_x->resolution == 1) return 0; @@ -763,11 +766,8 @@ tp_init_palmdetect(struct tp_dispatch *tp, /* Enable palm detection on touchpads >= 80 mm. Anything smaller probably won't need it, until we find out it does */ - if (width/device->abs.absinfo_x->resolution < 80) { - tp->palm.right_edge = INT_MAX; - tp->palm.left_edge = INT_MIN; + if (width/device->abs.absinfo_x->resolution < 80) return 0; - } /* palm edges are 5% of the width on each side */ tp->palm.right_edge = device->abs.absinfo_x->maximum - width * 0.05;