e_comp_wl: fix to send touch cancel event only when display turns off 06/248906/1
authorSung-Jin Park <sj76.park@samsung.com>
Thu, 3 Dec 2020 06:33:03 +0000 (15:33 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 3 Dec 2020 06:33:03 +0000 (15:33 +0900)
Change-Id: I762841886e159d81a3a536274c011e0ea6ead582
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/bin/e_comp_wl.c

index e9a3a65..7bc7836 100644 (file)
@@ -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;
 }