e_xdg_shell_v6: add api to get ec from zxdg_surface_v6 resource 63/212263/2
authorJunkyeong Kim <jk0430.kim@samsung.com>
Mon, 19 Aug 2019 11:08:13 +0000 (20:08 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 21 Aug 2019 02:09:16 +0000 (02:09 +0000)
the user data of zxdg_surface which is get from ecore_wl2_window_shell_surface_get is not ec.
so need api to get ec from zxdg_surface.

Change-Id: I01297bd630a6dd5ae36cfb7bebfd434b573c221b
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/bin/e_xdg_shell_v6.c
src/bin/e_xdg_shell_v6.h

index 7e5333e1471689b3ae3de36a82672bc558071bc2..d9777383024391256e54ee0ccfbcba0bb03b1e81 100644 (file)
@@ -1977,4 +1977,19 @@ e_xdg_shell_v6_shutdown(void)
 {
    E_FREE_FUNC(global_resource, wl_global_destroy);
 }
+
+EINTERN E_Client *
+e_xdg_shell_v6_xdg_surface_ec_get(struct wl_resource *resource)
+{
+   E_Xdg_Surface *exsurf = NULL;
+
+   exsurf = wl_resource_get_user_data(resource);
+   if (!exsurf)
+     {
+        ERR("No E_Xdg_Shell in wl_resource", NULL);
+        return NULL;
+     }
+
+   return exsurf->ec;
+}
 /* End of Xdg_shell */
index c77b23b7a32ecc3962cc6bcd107a93201b892a59..d835cad33437c57537fa1803d51a16479a67e344 100644 (file)
@@ -4,6 +4,7 @@
 #  define E_XDG_SHELL_V6_H
 
 EINTERN Eina_Bool e_xdg_shell_v6_init(void);
+EINTERN E_Client *e_xdg_shell_v6_xdg_surface_ec_get(struct wl_resource *resource);
 
 # endif
 #endif