From 1668cd5e8158a4d98516bfc7432af78be934253f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 13 Aug 2018 14:23:28 +1000 Subject: [PATCH] touchpad: drop check for left button areas No functional changes, anything that's in the top/bottom area but not in the respective middle/right area is a left button. Introduced by 13bda5adcb2f81f8ed9de762910ac9ecfa3b250b Fixes coverity complaint about use of uninitialized variable. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-buttons.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 13344804..15c2087e 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -510,7 +510,7 @@ tp_button_handle_state(struct tp_dispatch *tp, uint64_t time) event = BUTTON_EVENT_IN_BOTTOM_R; else if (is_inside_bottom_middle_area(tp, t)) event = BUTTON_EVENT_IN_BOTTOM_M; - else if (is_inside_bottom_left_area(tp, t)) + else event = BUTTON_EVENT_IN_BOTTOM_L; /* In the bottom area we check for movement @@ -521,7 +521,7 @@ tp_button_handle_state(struct tp_dispatch *tp, uint64_t time) event = BUTTON_EVENT_IN_TOP_R; else if (is_inside_top_middle_area(tp, t)) event = BUTTON_EVENT_IN_TOP_M; - else if (is_inside_top_left_area(tp, t)) + else event = BUTTON_EVENT_IN_TOP_L; } else { event = BUTTON_EVENT_IN_AREA;