From caba5c96cb83c715c68b41c6b646772afcaa48f0 Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Tue, 21 Jun 2022 19:50:24 +0900 Subject: [PATCH] e_xdg_shell_v6: modify code to use valid data type for commit hook Change-Id: I3faa2b05ec61a748293a56ca4d7838f51ca2cfb0 --- src/bin/e_xdg_shell_v6.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/bin/e_xdg_shell_v6.c b/src/bin/e_xdg_shell_v6.c index 40acd41720..07be2d1d47 100644 --- a/src/bin/e_xdg_shell_v6.c +++ b/src/bin/e_xdg_shell_v6.c @@ -62,7 +62,7 @@ struct _E_Xdg_Surface Eina_List *configure_list; /* list of data being appended whenever configure send and remove by ack_configure */ Ecore_Idle_Enterer *configure_idle; /* Idle_Enterer for sending configure */ - E_Comp_Hook *commit_handler; /* Handler raised when wl_surface is committed. */ + E_Comp_Wl_Hook *commit_hook; /* Handler raised when wl_surface is committed. */ E_Xdg_Surface_Role role; Eina_Rectangle configured_geometry; /* configured geometry by compositor */ @@ -1621,7 +1621,7 @@ static const struct zxdg_surface_v6_interface _e_xdg_surface_interface = _e_xdg_surface_cb_configure_ack }; -static Eina_Bool +static void _e_xdg_surface_cb_commit(void *data, E_Client *ec) { E_Xdg_Surface *exsurf; @@ -1630,10 +1630,10 @@ _e_xdg_surface_cb_commit(void *data, E_Client *ec) exsurf = (E_Xdg_Surface *)data; if (exsurf->ec != ec) - goto end; + return; if (!exsurf->wait_next_commit) - goto end; + return; LOG("Wl_Surface Commit, Update Xdg_Surface state %s", exsurf->ec, @@ -1666,9 +1666,6 @@ _e_xdg_surface_cb_commit(void *data, E_Client *ec) _e_xdg_popup_committed((E_Xdg_Popup *)exsurf); break; } - -end: - return ECORE_CALLBACK_PASS_ON; } static void @@ -1685,8 +1682,8 @@ _e_xdg_surface_del(E_Xdg_Surface *exsurf) E_FREE_LIST(exsurf->configure_list, free); if (exsurf->configure_idle) ecore_idle_enterer_del(exsurf->configure_idle); - if (exsurf->commit_handler) - e_comp_wl_hook_del(exsurf->commit_handler); + if (exsurf->commit_hook) + e_comp_wl_hook_del(exsurf->commit_hook); } static void @@ -1776,7 +1773,7 @@ _e_xdg_surface_create(E_Xdg_Shell *shell, exsurf->shell = shell; exsurf->ec = ec; exsurf->configured = EINA_FALSE; - exsurf->commit_handler = + exsurf->commit_hook = e_comp_wl_hook_add(E_COMP_WL_HOOK_CLIENT_SURFACE_COMMIT, _e_xdg_surface_cb_commit, exsurf); -- 2.34.1