e_comp_object: Set an embedded E_Client as comp_object data 61/257261/2
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 21 Apr 2021 09:50:30 +0000 (18:50 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 23 Apr 2021 02:13:04 +0000 (02:13 +0000)
When evas_object_data_get(obj, "E_Client") called, it will return
embedded E_Client instead of original E_Client.

This is to hide details of embedded concept.
Specifically, e_hwc_windows implementation will make a visibile window
list with an embedded E_Client, not a container.

Change-Id: I94c850d262c1357eb28f635b2ec3e97ac37c06ba

src/bin/e_comp_object.c

index bdd2cd9c37d43680f8f153acb1ef585bb443876d..bc862d6052c87cfab7a3fd7b8cbe7d6fc2207c7e 100644 (file)
@@ -6411,6 +6411,18 @@ e_comp_object_embedded_comp_object_set(Evas_Object *obj, Evas_Object *in_obj)
 {
    API_ENTRY EINA_FALSE;
 
+   E_Comp_Object *embedded_cw;
+
+   embedded_cw = evas_object_smart_data_get(in_obj);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(embedded_cw, EINA_FALSE);
+
+   /* Make it return embedded E_Client so that others doesn't need to know
+    * about details of "embedded" notion.
+    * The current actual purpose behind this is for e_hwc_winodws to build
+    * a visible window list with an embedded E_Client, not with a container
+    * E_Client. */
+   evas_object_data_set(obj, "E_Client", embedded_cw->ec);
+
    cw->embedded = EINA_TRUE;
    cw->external_content = EINA_TRUE;