From: Seunghun Lee Date: Thu, 18 Jan 2024 04:12:00 +0000 (+0900) Subject: viewport: Use E_Surface's destroy signal instead of surface wl_resource's X-Git-Tag: accepted/tizen/unified/20240126.155400~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F20%2F304820%2F2;p=platform%2Fupstream%2Fenlightenment.git viewport: Use E_Surface's destroy signal instead of surface wl_resource's It replaces the use of the destroy signal from the surface wl_resource with E_Surface's destroy signal. Since E_Surface acts as a wrapper around surface wl_resource, it makes more sense to utilize its signals instead. Change-Id: Ib02535c9243bbe96d1ca624bf1fd4143deeebe88 --- diff --git a/src/bin/e_comp_wl_viewport.c b/src/bin/e_comp_wl_viewport.c index ac98620..2eff0c0 100644 --- a/src/bin/e_comp_wl_viewport.c +++ b/src/bin/e_comp_wl_viewport.c @@ -1659,13 +1659,6 @@ e_comp_wl_viewport_create(struct wl_resource *resource, return EINA_FALSE; } - struct wl_resource *comp_surface = e_comp_wl_client_surface_get(ec); - if (!comp_surface) - { - ERR("wrong resource"); - return EINA_FALSE; - } - surface = e_surface_from_resource(surface_resource); if (!surface) { @@ -1733,7 +1726,7 @@ e_comp_wl_viewport_create(struct wl_resource *resource, viewport, _e_comp_wl_viewport_destroy); viewport->surface_destroy_listener.notify = _e_comp_wl_viewport_cb_surface_destroy; - wl_resource_add_destroy_listener(comp_surface, &viewport->surface_destroy_listener); + e_surface_destroy_listener_add(viewport->surface, &viewport->surface_destroy_listener); PIN("create viewport");