diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2016-10-14 16:01:54 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2016-10-14 16:07:08 -0500 |
commit | 35995be7b0592b11a849575a4e51033b92495e75 (patch) | |
tree | 6cba13777dcd1f1df3a96f846059a47342e18ead | |
parent | 2515556673d9ce4bb811b60ce19eee03e8499d6b (diff) | |
download | efl-35995be7b0592b11a849575a4e51033b92495e75.tar.gz |
ecore_wl2: add API for testing if a window has a shell surface
-rw-r--r-- | src/lib/ecore_wl2/Ecore_Wl2.h | 9 | ||||
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_window.c | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index fec234c612..e101037698 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1233,6 +1233,15 @@ EAPI Eina_Bool ecore_wl2_offer_supprts_mime(Ecore_Wl2_Offer *offer, const char * */ EAPI void ecore_wl2_offer_finish(Ecore_Wl2_Offer *offer); +/** + * Check if a window has a shell surface - without one it can't be visible. + * + * @param The window to check + * + * @return Returns true if the window has an associated shell surface. + * @since 1.19 + */ +EAPI Eina_Bool ecore_wl2_window_has_shell_surface(Ecore_Wl2_Window *win); # endif diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index e11518f0c5..cd796e95cb 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1002,3 +1002,11 @@ ecore_wl2_window_input_get(Ecore_Wl2_Window *window) return NULL; } + +EAPI Eina_Bool +ecore_wl2_window_has_shell_surface(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE); + + return (window->xdg_surface || window->wl_shell_surface); +} |