We don't want touches in the button area to cause the pointer to move, add a tp_button_touch_active function which the main code in evdev-mt-touchpad can call to see if a touch should be consider a candidate for being the pointer, should be taken into account for 2 finger scrolling, etc.
The idea behind the main code polling for this is that in the future with ie edge scrolling we will have another independent state machine, which may also want to block a touch from being the pointer, so it is best for the main code to test all independent state machines, rather then having the state-machines poke the is_pointer variabel directly. Signed-off-by: Hans de Goede <[email protected]> Acked-by: Peter Hutterer <[email protected]> --- src/evdev-mt-touchpad-buttons.c | 5 +++++ src/evdev-mt-touchpad.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index f953cd1..e789a87 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -602,3 +602,8 @@ tp_post_button_events(struct tp_dispatch *tp, uint32_t time) return rc; } +int +tp_button_touch_active(struct tp_dispatch *tp, struct tp_touch *t) +{ + return t->button.state == BUTTON_STATE_AREA; +} diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index 8d8dd84..04da6a6 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -229,4 +229,7 @@ tp_post_button_events(struct tp_dispatch *tp, uint32_t time); int tp_button_handle_state(struct tp_dispatch *tp, uint32_t time); +int +tp_button_touch_active(struct tp_dispatch *tp, struct tp_touch *t); + #endif -- 1.9.0 _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
