devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b678382b8aca530c24801a2f56cb36beb68979fe
commit b678382b8aca530c24801a2f56cb36beb68979fe Author: Chris Michael <[email protected]> Date: Tue Jun 13 12:32:59 2017 -0400 ecore-wl2: Add API to support deleting auxiliary window hints @feature Signed-off-by: Chris Michael <[email protected]> --- src/lib/ecore_wl2/Ecore_Wl2.h | 11 +++++++++++ src/lib/ecore_wl2/ecore_wl2_window.c | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index ef2eb043fb..cff185f3f5 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1134,6 +1134,17 @@ EAPI void ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *window, int id, const EAPI void ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *window, int id, const char *val); /** + * Delete an auxiliary hint on a given window + * + * @param window + * @param id + * + * @ingroup Ecore_Wl2_Window_Group + * @since 1.20 + */ +EAPI void ecore_wl2_window_aux_hint_del(Ecore_Wl2_Window *window, int id); + +/** * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions * @ingroup Ecore_Wl2_Group * diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index cc6acc6fc8..e47b6b8c8d 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1418,3 +1418,28 @@ ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *window, int id, const char *v } } } + +EAPI void +ecore_wl2_window_aux_hint_del(Ecore_Wl2_Window *window, int id) +{ + Eina_Inlist *tmp; + Ecore_Wl2_Aux_Hint *ehint; + + EINA_SAFETY_ON_NULL_RETURN(window); + + EINA_INLIST_FOREACH_SAFE(window->supported_aux_hints, tmp, ehint) + { + if (ehint->id == id) + { + window->supported_aux_hints = + eina_inlist_remove(window->supported_aux_hints, + EINA_INLIST_GET(ehint)); + + eina_stringshare_del(ehint->hint); + eina_stringshare_del(ehint->val); + free(ehint); + + break; + } + } +} --
