From 04d1974f3e7d82960509fe5634b5414444ba596f Mon Sep 17 00:00:00 2001 From: "ritesh.u" Date: Wed, 29 Nov 2017 19:50:15 +0530 Subject: [PATCH] e_comp_wl: Ensure touch event radius storage variables update whenever there is an update from firmware Change-Id: I5294c64322f04b7825d8f98ebb51ffc3582d1ec4 Signed-off-by: ritesh.u --- src/bin/e_comp_wl.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 042de54ffd..05f4ca9283 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -554,6 +554,29 @@ _e_comp_wl_evas_cb_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U evas_object_move(ec->comp_data->sub.below_obj, ec->x, ec->y); } +static void +_e_comp_wl_touch_axis_clean_up(void) +{ + int i; + unsigned int pressed = e_comp_wl->touch.pressed; + + if (!pressed) return; + + for (i = 0; i < E_COMP_WL_TOUCH_MAX; i++) + { + if (pressed & (1 << i)) + { + e_comp_wl->input_device_manager.multi[i].radius_x = 1.0; + e_comp_wl->input_device_manager.multi[i].radius_y = 1.0; + e_comp_wl->input_device_manager.multi[i].pressure = 1.0; + e_comp_wl->input_device_manager.multi[i].angle = 0.0; + + pressed &= ~(1 << i); + } + if (!pressed) break; + } +} + static void _e_comp_wl_send_touch_cancel(E_Client *ec) { @@ -562,6 +585,8 @@ _e_comp_wl_send_touch_cancel(E_Client *ec) struct wl_client *wc; E_Comp_Config *comp_conf = NULL; + _e_comp_wl_touch_axis_clean_up(); + if (!ec) return; if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data || !ec->comp_data->surface) return; -- 2.34.1