e_xdg_shell_v6: modify code to use valid data type for commit hook 90/276590/1 accepted/tizen/unified/20220622.133938 submit/tizen/20220621.233903
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 21 Jun 2022 10:50:24 +0000 (19:50 +0900)
committerJunseok Kim <juns.kim@samsung.com>
Tue, 21 Jun 2022 11:16:58 +0000 (20:16 +0900)
Change-Id: I3faa2b05ec61a748293a56ca4d7838f51ca2cfb0

src/bin/e_xdg_shell_v6.c

index 40acd417200ebcdcd91617123f1a2f8d982c710f..07be2d1d47c675afdc47f51819a48b56ed5ffb66 100644 (file)
@@ -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);