discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=8e5a2cb430d2bc18bff1dcfdd69a48ebb09efe55

commit 8e5a2cb430d2bc18bff1dcfdd69a48ebb09efe55
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Jul 1 16:40:10 2015 -0400

    add client util function for determining if a backing xwindow exists
---
 src/bin/e_client.c | 14 ++++++++++++++
 src/bin/e_client.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 1833adb..8fe7719 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -4913,6 +4913,20 @@ e_client_is_stacking(const E_Client *ec)
    return e_comp->layers[e_comp_canvas_layer_map(ec->layer)].obj == ec->frame;
 }
 
+E_API Eina_Bool
+e_client_has_xwindow(const E_Client *ec)
+{
+#ifdef HAVE_WAYLAND_ONLY
+   (void)ec;
+   return EINA_FALSE;
+#endif
+#ifdef HAVE_WAYLAND
+   if (!e_pixmap_is_x(ec->pixmap))
+     return !!e_comp_wl_client_xwayland_pixmap(ec);
+#endif
+   return e_pixmap_is_x(ec->pixmap);
+}
+
 ////////////////////////////////////////////
 
 E_API void
diff --git a/src/bin/e_client.h b/src/bin/e_client.h
index 7ed798b..9f62e09 100644
--- a/src/bin/e_client.h
+++ b/src/bin/e_client.h
@@ -821,6 +821,7 @@ E_API int e_client_pointer_warp_to_center_now(E_Client *ec);
 E_API int e_client_pointer_warp_to_center(E_Client *ec);
 E_API void e_client_redirected_set(E_Client *ec, Eina_Bool set);
 E_API Eina_Bool e_client_is_stacking(const E_Client *ec);
+E_API Eina_Bool e_client_has_xwindow(const E_Client *ec);
 E_API Eina_Bool e_client_desk_window_profile_available_check(E_Client *ec, 
const char *profile);
 E_API void      e_client_desk_window_profile_wait_desk_set(E_Client *ec, 
E_Desk *desk);
 E_API void      e_client_layout_cb_set(E_Client_Layout_Cb cb);

-- 


Reply via email to