}
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;
}