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/8.0/unified/20240405.142131~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10cfcabb334bdafc2473b46d312235861c45606d;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: I4ffa0da4b9583d9065902e3b9f4590598d87aa54 --- diff --git a/src/bin/e_comp_wl_viewport.c b/src/bin/e_comp_wl_viewport.c index ac9862093b..2eff0c04af 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");