From 215a24935ca80ed35a4d2736e726f58347f4ba43 Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Thu, 3 Dec 2020 15:33:03 +0900 Subject: [PATCH] e_comp_wl: fix to send touch cancel event only when display turns off Change-Id: I762841886e159d81a3a536274c011e0ea6ead582 Signed-off-by: Sung-Jin Park --- src/bin/e_comp_wl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index e9a3a6504b..7bc783610b 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2214,9 +2214,17 @@ _e_comp_wl_cb_mouse_button_cancel(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_ } static Eina_Bool -_e_comp_wl_cb_zone_display_state_change(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Zone_Display_State_Change *ev EINA_UNUSED) +_e_comp_wl_cb_zone_display_state_change(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Zone_Display_State_Change *ev) { - _e_comp_wl_touch_cancel(); + if (!ev) ECORE_CALLBACK_PASS_ON; + + E_Zone *zone = ev->zone; + + E_OBJECT_CHECK_RETURN(zone, ECORE_CALLBACK_PASS_ON); + E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, ECORE_CALLBACK_PASS_ON); + + if (zone->display_state == E_ZONE_DISPLAY_STATE_OFF) + _e_comp_wl_touch_cancel(); return ECORE_CALLBACK_PASS_ON; } -- 2.34.1