summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:15:43 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:17:07 -0400
commitb51d45835c534970361845e4f666d405d5b66d6a (patch)
treefb450d6d562e28db49598f7714848ac5e3e1e51c /src/lib/efl_wl
parent453a0fb82ae62757dab0590d4af00731ce5afe2b (diff)
efl-wl: rework parent surface getter to a more useful property
Summary: getting any parent is probably fine Depends on D11466 Reviewers: segfaultxavi, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11467
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/Efl_Wl.h4
-rw-r--r--src/lib/efl_wl/efl_wl.c16
-rw-r--r--src/lib/efl_wl/efl_wl_surface.eo6
3 files changed, 11 insertions, 15 deletions
diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_wl/Efl_Wl.h
index 06fca3f5b5..5676d892ae 100644
--- a/src/lib/efl_wl/Efl_Wl.h
+++ b/src/lib/efl_wl/Efl_Wl.h
@@ -199,7 +199,7 @@ EAPI int32_t efl_wl_surface_pid_get(Evas_Object *surface);
199 * @since 1.21 199 * @since 1.21
200 */ 200 */
201EAPI Evas_Object *efl_wl_extracted_surface_object_find(void *surface_resource); 201EAPI Evas_Object *efl_wl_extracted_surface_object_find(void *surface_resource);
202 202#if 0
203/** 203/**
204 * Get the Evas_Object for an extracted surface's parent, or NULL if the parent is not extracted 204 * Get the Evas_Object for an extracted surface's parent, or NULL if the parent is not extracted
205 * 205 *
@@ -210,7 +210,7 @@ EAPI Evas_Object *efl_wl_extracted_surface_object_find(void *surface_resource);
210 * @since 1.21 210 * @since 1.21
211 */ 211 */
212EAPI Evas_Object *efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface); 212EAPI Evas_Object *efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface);
213 213#endif
214/** 214/**
215 * Set external xkbcommon resources to be used read-only by the compositor object 215 * Set external xkbcommon resources to be used read-only by the compositor object
216 * 216 *
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index d6b77f4f44..c56ec323f7 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -5773,22 +5773,12 @@ efl_wl_extracted_surface_object_find(void *surface_resource)
5773 return cs->obj; 5773 return cs->obj;
5774} 5774}
5775 5775
5776Eo * 5776static EOLIAN Eo *
5777efl_wl_extracted_surface_extracted_parent_get(Eo *surface) 5777_efl_wl_surface_parent_surface_get(const Eo *surface, Comp_Surface *cs)
5778{ 5778{
5779 Comp_Surface *cs;
5780
5781 EINA_SAFETY_ON_NULL_RETURN_VAL(surface, NULL);
5782 cs = efl_data_scope_get(surface, EFL_WL_SURFACE_CLASS);
5783 if (!cs) abort();
5784 EINA_SAFETY_ON_TRUE_RETURN_VAL(!cs->extracted, NULL);
5785 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, NULL); 5779 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, NULL);
5786 5780
5787 if (cs->parent) 5781 if (cs->parent && cs->role) return cs->parent->obj;
5788 {
5789 if (!cs->parent->extracted) return NULL;
5790 return cs->parent->obj;
5791 }
5792 return NULL; 5782 return NULL;
5793} 5783}
5794 5784
diff --git a/src/lib/efl_wl/efl_wl_surface.eo b/src/lib/efl_wl/efl_wl_surface.eo
index 8f8e44c893..65c7327c95 100644
--- a/src/lib/efl_wl/efl_wl_surface.eo
+++ b/src/lib/efl_wl/efl_wl_surface.eo
@@ -12,6 +12,12 @@ class @beta Efl.Wl.Surface extends Efl.Canvas.Group
12 pid: int; 12 pid: int;
13 } 13 }
14 } 14 }
15 @property parent_surface {
16 get {}
17 values {
18 parent: Efl.Wl.Surface;
19 }
20 }
15 } 21 }
16 implements { 22 implements {
17 Efl.Object.constructor; 23 Efl.Object.constructor;