e_comp_wl: Do update stack order of subsurface for safety. 57/224757/1
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 16 Jan 2020 03:34:45 +0000 (12:34 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 13 Feb 2020 02:01:01 +0000 (11:01 +0900)
There is possibility that stack order of subsurface is abnormal before
registering callback function for EVAS_CALLBACK_RESTACK.
So, a function updating stack order of subsurface has to be called for
safety.

Change-Id: I8d8704dc012421a2cd444d5549f77ee17d569924

src/bin/e_comp_wl.c

index 64f9ec4..d41b7ef 100644 (file)
@@ -2040,6 +2040,17 @@ _e_comp_wl_client_evas_init(E_Client *ec)
    if (!ec || !ec->comp_data) return;
    if (ec->comp_data->evas_init) return;
 
+   /* Workaround:
+    * Updating stack order of subsurface has to be done for safety, because
+    * stack order can be abnormal before registering a callback function.
+    * If a callback function of EVAS_CALLBACK_RESTACK is called immediately
+    * in some way, stack order will become normal, otherwise it will remain
+    * abnormal until callback function is called.
+    *
+    * Note that stacking subsurface object can be improved by taking advantage
+    * of evas smart member object mechanism. */
+   e_comp_wl_subsurface_stack_update(ec);
+
    evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_SHOW,        _e_comp_wl_evas_cb_show,        ec);
    evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_HIDE,        _e_comp_wl_evas_cb_hide,        ec);
    evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOVE,        _e_comp_wl_evas_cb_move,        ec);