e_comp_wl: Ensure touch event radius storage variables update whenever there is an... 05/162205/3
authorritesh.u <ritesh.u@samsung.com>
Wed, 29 Nov 2017 14:20:15 +0000 (19:50 +0530)
committerJengHyun Kang <jhyuni.kang@samsung.com>
Mon, 11 Dec 2017 10:24:32 +0000 (19:24 +0900)
Change-Id: I5294c64322f04b7825d8f98ebb51ffc3582d1ec4
Signed-off-by: ritesh.u <ritesh.u@samsung.com>
src/bin/e_comp_wl.c

index 042de54ffdf0f96bef5649c4a0344b2b15cb25ff..05f4ca9283b1cfa379e8236924bba2d93db58812 100644 (file)
@@ -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;