devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dfffabb224d36204ca881e68378bdf4739a775e4

commit dfffabb224d36204ca881e68378bdf4739a775e4
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Sep 29 11:00:32 2015 -0400

    ecore-wl2: Add API function to return surface id of a window
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h         |  4 ++++
 src/lib/ecore_wl2/ecore_wl2_private.h |  2 +-
 src/lib/ecore_wl2/ecore_wl2_window.c  | 10 ++++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 57441d3..2571787 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -338,6 +338,9 @@ EAPI int ecore_wl2_window_id_get(Ecore_Wl2_Window *window);
  */
 EAPI struct wl_surface *ecore_wl2_window_surface_get(Ecore_Wl2_Window *window);
 
+/* TODO: doxy */
+EAPI int ecore_wl2_window_surface_id_get(Ecore_Wl2_Window *window);
+
 /**
  * Show a given Ecore_Wl2_Window
  *
@@ -470,6 +473,7 @@ EAPI void ecore_wl2_window_pointer_set(Ecore_Wl2_Window 
*window, struct wl_surfa
 /* TODO: doxy */
 EAPI void ecore_wl2_window_cursor_from_name_set(Ecore_Wl2_Window *window, 
const char *cursor);
 
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 299b7b0..4ac1182 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -78,7 +78,7 @@ struct _Ecore_Wl2_Window
 
    Ecore_Wl2_Window *parent;
 
-   int id, rotation;
+   int id, rotation, surface_id;
    const char *title;
    const char *class;
    const char *cursor;
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index fb5e661..27d85d0 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -297,11 +297,21 @@ ecore_wl2_window_surface_get(Ecore_Wl2_Window *window)
      {
         window->surface =
           wl_compositor_create_surface(window->display->wl.compositor);
+
+        window->surface_id =
+          wl_proxy_get_id((struct wl_proxy *)window->surface);
      }
 
    return window->surface;
 }
 
+EAPI int
+ecore_wl2_window_surface_id_get(Ecore_Wl2_Window *window)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(window, -1);
+   return window->surface_id;
+}
+
 EAPI void
 ecore_wl2_window_show(Ecore_Wl2_Window *window)
 {

-- 


Reply via email to