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);