Hi,

On 10-05-17 04:21, Peter Hutterer wrote:
This was originally left outside of the button areas in case users tap in
those zones, but we're getting false tap events in that zone.

On a 100mm touchpad, the edge zone is merely 5mm, it's acceptable to ignore
taps in that area even in the software button. We can revisit this if we see
tap detection failures in the future.

https://bugzilla.redhat.com/show_bug.cgi?id=1415796

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>

Sounds reasonable to me and the code changes look good:

Reviewed-by: Hans de Goede <hdego...@redhat.com>

Regards,

Hans


---
  src/evdev-mt-touchpad.c | 11 ++---------
  test/test-touchpad.c    |  8 ++++----
  2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index e0757e17..17b14bc8 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -557,15 +557,8 @@ tp_palm_tap_is_palm(const struct tp_dispatch *tp, const 
struct tp_touch *t)
            t->point.x < tp->palm.right_edge)
                return false;
- /* We're inside the left/right palm edge and not in one of the
-        * software button areas */
-       if (t->point.y < tp->buttons.bottom_area.top_edge) {
-               evdev_log_debug(tp->device,
-                               "palm: palm-tap detected\n");
-               return true;
-       }
-
-       return false;
+       evdev_log_debug(tp->device, "palm: palm-tap detected\n");
+       return true;
  }
static bool
diff --git a/test/test-touchpad.c b/test/test-touchpad.c
index 2731500a..d91c2449 100644
--- a/test/test-touchpad.c
+++ b/test/test-touchpad.c
@@ -1176,15 +1176,15 @@ START_TEST(touchpad_palm_detect_tap_softbuttons)
litest_drain_events(li); - litest_touch_down(dev, 0, 95, 5);
+       litest_touch_down(dev, 0, 99, 99);
        litest_touch_up(dev, 0);
        litest_assert_empty_queue(li);
- litest_touch_down(dev, 0, 5, 5);
+       litest_touch_down(dev, 0, 1, 99);
        litest_touch_up(dev, 0);
        litest_assert_empty_queue(li);
- litest_touch_down(dev, 0, 5, 99);
+       litest_touch_down(dev, 0, 10, 99);
        litest_touch_up(dev, 0);
        litest_assert_button_event(li,
                                   BTN_LEFT,
@@ -1194,7 +1194,7 @@ START_TEST(touchpad_palm_detect_tap_softbuttons)
                                   LIBINPUT_BUTTON_STATE_RELEASED);
        litest_assert_empty_queue(li);
- litest_touch_down(dev, 0, 95, 99);
+       litest_touch_down(dev, 0, 90, 99);
        litest_touch_up(dev, 0);
        litest_assert_button_event(li,
                                   BTN_LEFT,

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to