video: 'E_Client_Video' handles 'follow_topmost_visibility' operation instead of... 35/209035/3
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 17 May 2019 08:35:38 +0000 (17:35 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 3 Jul 2019 08:34:07 +0000 (08:34 +0000)
'follow_topmost_visibility' is related to 'E_Client', not HWC mode.

Change-Id: I8377e0a6680d70e163598a4ae23c0f55f8e707cc

src/bin/video/e_client_video.c
src/bin/video/e_video_internal.h
src/bin/video/iface/e_video_hwc.c
src/bin/video/iface/e_video_hwc.h
src/bin/video/iface/e_video_hwc_planes.c
src/bin/video/iface/e_video_hwc_windows.c

index c3f8ea3dffd62dac61576f093adeb75210e0f9ff..e5e6978b36a79ac8e786d4f517dccde816d14f37 100644 (file)
@@ -25,6 +25,7 @@ struct _E_Client_Video
    E_Client *ec;
 
    Eina_List *event_handlers;
+   E_Comp_Wl_Hook *subsurf_create_hook_handler;
 
    Eina_Bool hw_composition;
    Eina_Bool follow_topmost_visibility;
@@ -86,6 +87,7 @@ _e_client_video_deinit(E_Client_Video *ecv)
    _e_client_video_comp_iface_deinit(ecv);
 
    E_FREE_LIST(ecv->event_handlers, ecore_event_handler_del);
+   E_FREE_FUNC(ecv->subsurf_create_hook_handler, e_comp_wl_hook_del);
 }
 
 static void
@@ -136,6 +138,146 @@ end:
    return ECORE_CALLBACK_PASS_ON;
 }
 
+static void
+_e_client_video_ec_visibility_event_free(void *d EINA_UNUSED, E_Event_Client *ev)
+{
+   e_object_unref(E_OBJECT(ev->ec));
+   free(ev);
+}
+
+static void
+_e_client_video_ec_visibility_event_send(E_Client *ec)
+{
+   E_Event_Client *ev;
+   int obscured;
+
+   obscured = ec->visibility.obscured;
+   VIN("Signal visibility change event of video, type %d",
+       ec, obscured);
+
+   ev = E_NEW(E_Event_Client , 1);
+   EINA_SAFETY_ON_NULL_RETURN(ev);
+
+   ev->ec = ec;
+   e_object_ref(E_OBJECT(ec));
+   ecore_event_add(E_EVENT_CLIENT_VISIBILITY_CHANGE, ev,
+                   (Ecore_End_Cb)_e_client_video_ec_visibility_event_free, NULL);
+}
+
+static void
+_e_client_video_ec_visibility_set(E_Client *ec, E_Visibility vis)
+{
+   if (ec->visibility.obscured == vis)
+     return;
+
+   ec->visibility.obscured = vis;
+   _e_client_video_ec_visibility_event_send(ec);
+}
+
+static Eina_Bool
+_e_client_video_cb_ec_visibility_change(void *data, int type EINA_UNUSED, void *event)
+{
+   E_Client_Video *ecv;
+   E_Event_Client *ev;
+   E_Client *topmost;
+
+   ecv = data;
+   if (!ecv->follow_topmost_visibility)
+     goto end;
+
+   topmost = e_comp_wl_topmost_parent_get(ecv->ec);
+   if ((!topmost) || (topmost == ecv->ec))
+     goto end;
+
+   ev = event;
+   if (ev->ec != topmost)
+     goto end;
+
+   _e_client_video_ec_visibility_set(ecv->ec, topmost->visibility.obscured);
+
+end:
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static E_Client *
+_e_client_video_ec_offscreen_parent_get(E_Client *ec)
+{
+   E_Client *parent = NULL;
+
+   if (!ec->comp_data || !ec->comp_data->sub.data)
+     return NULL;
+
+   parent = ec->comp_data->sub.data->parent;
+   while (parent)
+     {
+        if (!parent->comp_data || !parent->comp_data->sub.data)
+          return NULL;
+
+        if (parent->comp_data->sub.data->remote_surface.offscreen_parent)
+          return parent->comp_data->sub.data->remote_surface.offscreen_parent;
+
+        parent = parent->comp_data->sub.data->parent;
+     }
+
+   return NULL;
+}
+
+static Eina_Bool
+_e_client_video_cb_remote_surface_provider_visibility_change(void *data, int type EINA_UNUSED, void *event)
+{
+   E_Client_Video *ecv;
+   E_Event_Remote_Surface_Provider *ev;
+   E_Client *offscreen_parent;
+
+   ecv = data;
+   offscreen_parent = _e_client_video_ec_offscreen_parent_get(ecv->ec);
+   if (!offscreen_parent)
+     goto end;
+
+   ev = event;
+   if (ev->ec != offscreen_parent)
+     goto end;
+
+   switch (ev->ec->visibility.obscured)
+     {
+      case E_VISIBILITY_FULLY_OBSCURED:
+         evas_object_hide(ecv->ec->frame);
+         break;
+      case E_VISIBILITY_UNOBSCURED:
+         evas_object_show(ecv->ec->frame);
+      default:
+         VER("Not implemented", ecv->ec);
+         break;
+     }
+
+end:
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static void
+_e_client_video_cb_hook_subsurface_create(void *data, E_Client *ec)
+{
+   E_Client_Video *ecv;
+   E_Client *topmost1, *topmost2;
+
+   ecv = data;
+   if (!ecv->follow_topmost_visibility)
+     return;
+
+   /* This is to raise an 'VISIBILITY_CHANGE' event to video client when its
+    * topmost ancestor is changed. The reason why it uses hook handler of
+    * creation of subsurface is that there is no event for like parent change,
+    * and being created subsurface that has common topmost parent means
+    * it implies topmost parent has been possibly changed. */
+   topmost1 = e_comp_wl_topmost_parent_get(ec);
+   topmost2 = e_comp_wl_topmost_parent_get(ecv->ec);
+   if (topmost1 && topmost2)
+     {
+        if (topmost1 == topmost2)
+          _e_client_video_ec_visibility_set(ecv->ec, topmost1->visibility.obscured);
+     }
+}
+
 static Eina_Bool
 _e_client_video_init(E_Client_Video *ecv, E_Client *ec)
 {
@@ -154,6 +296,14 @@ _e_client_video_init(E_Client_Video *ecv, E_Client *ec)
                          _e_client_video_cb_ec_zone_set, ecv);
    E_LIST_HANDLER_APPEND(ecv->event_handlers, E_EVENT_CLIENT_REMOVE,
                          _e_client_video_cb_ec_remove, ecv);
+   E_LIST_HANDLER_APPEND(ecv->event_handlers, E_EVENT_CLIENT_VISIBILITY_CHANGE,
+                         _e_client_video_cb_ec_visibility_change, ecv);
+   E_LIST_HANDLER_APPEND(ecv->event_handlers, E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE,
+                         _e_client_video_cb_remote_surface_provider_visibility_change, ecv);
+
+   ecv->subsurf_create_hook_handler =
+      e_comp_wl_hook_add(E_COMP_WL_HOOK_SUBSURFACE_CREATE,
+                         _e_client_video_cb_hook_subsurface_create, ecv);
 
    return EINA_TRUE;
 }
@@ -353,13 +503,6 @@ e_client_video_hw_composition_unset(E_Client_Video *ecv)
    ecv->hw_composition = EINA_FALSE;
 }
 
-EINTERN Eina_Bool
-e_client_video_topmost_visibility_follow_get(E_Client_Video *ecv)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ecv, EINA_FALSE);
-   return ecv->follow_topmost_visibility;
-}
-
 EINTERN Eina_Bool
 e_client_video_property_allow_get(E_Client_Video *ecv)
 {
index 838510ec17aa7795b519ab8a14613c8715069af7..74df91a2929ed17d4f44a440f7559130ba1b47b6 100644 (file)
@@ -61,7 +61,6 @@ EINTERN E_Video_Comp_Iface  *e_video_external_iface_create(E_Client_Video *ecv);
 EINTERN E_Client            *e_client_video_ec_get(E_Client_Video *ecv);
 EINTERN void                 e_client_video_hw_composition_set(E_Client_Video *ecv);
 EINTERN void                 e_client_video_hw_composition_unset(E_Client_Video *ecv);
-EINTERN Eina_Bool            e_client_video_topmost_visibility_follow_get(E_Client_Video *ecv);
 EINTERN Eina_Bool            e_client_video_property_allow_get(E_Client_Video *ecv);
 
 #endif
index 3e5c57c564fb64e3ad2e4f9abe437acce584de1d..4449ed2c8323bf7b2d2efd378532b22498985d68 100644 (file)
@@ -1420,6 +1420,59 @@ _e_video_hwc_cb_client_buffer_change(void *data, int type, void *event)
    return ECORE_CALLBACK_PASS_ON;
 }
 
+static void
+_e_video_hwc_cb_evas_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+   E_Video_Hwc *evh;
+   E_Client *ec;
+
+   evh = data;
+   ec = evh->ec;
+   if (e_object_is_del(E_OBJECT(ec)))
+     return;
+
+   if (evh->need_force_render)
+     {
+        VIN("video forcely rendering..", evh->ec);
+        _e_video_hwc_render(evh, __FUNCTION__);
+     }
+
+   /* if stand_alone is true, not show */
+   if (ec->comp_data->sub.data && ec->comp_data->sub.data->stand_alone)
+     return;
+
+   /* FIXME It seems unnecessary. */
+   if (evh->hwc_policy == E_HWC_POLICY_PLANES)
+     {
+        if (!e_video_hwc_planes_properties_commit(evh))
+          return;
+     }
+
+   if (evh->current_fb)
+     _e_video_hwc_buffer_show(evh, evh->current_fb, evh->current_fb->content_t);
+
+}
+
+static void
+_e_video_hwc_client_event_init(E_Video_Hwc *evh)
+{
+   evas_object_event_callback_add(evh->ec->frame, EVAS_CALLBACK_SHOW,
+                                  _e_video_hwc_cb_evas_show, evh);
+   E_LIST_HANDLER_APPEND(evh->ec_event_handler, E_EVENT_CLIENT_SHOW,
+                         _e_video_hwc_cb_client_show, evh);
+   E_LIST_HANDLER_APPEND(evh->ec_event_handler, E_EVENT_CLIENT_BUFFER_CHANGE,
+                         _e_video_hwc_cb_client_buffer_change, evh);
+}
+
+static void
+_e_video_hwc_client_event_deinit(E_Video_Hwc *evh)
+{
+   evas_object_event_callback_del_full(evh->ec->frame, EVAS_CALLBACK_SHOW,
+                                       _e_video_hwc_cb_evas_show, evh);
+
+   E_FREE_LIST(evh->ec_event_handler, ecore_event_handler_del);
+}
+
 static void
 _e_video_hwc_iface_destroy(E_Video_Comp_Iface *iface)
 {
@@ -1462,6 +1515,8 @@ _e_video_hwc_iface_destroy(E_Video_Comp_Iface *iface)
    if (e_comp_object_mask_has(evh->ec->frame))
      e_comp_object_mask_set(evh->ec->frame, EINA_FALSE);
 
+   _e_video_hwc_client_event_deinit(evh);
+
    E_FREE_FUNC(evh->render.job, ecore_job_del);
 
    evh->backend.destroy(evh);
@@ -1569,57 +1624,6 @@ _e_video_hwc_create(E_Client *ec)
    return evh;
 }
 
-static void
-_e_video_hwc_show(E_Video_Hwc *evh)
-{
-   E_Client *ec;
-
-   ec = evh->ec;
-   if (e_object_is_del(E_OBJECT(ec)))
-     return;
-
-   if (evh->need_force_render)
-     {
-        VIN("video forcely rendering..", evh->ec);
-        _e_video_hwc_render(evh, __FUNCTION__);
-     }
-
-   /* if stand_alone is true, not show */
-   if ((ec->comp_data->sub.data && ec->comp_data->sub.data->stand_alone) ||
-       (ec->comp_data->sub.data && e_client_video_topmost_visibility_follow_get(evh->ecv)))
-     return;
-
-   /* FIXME It seems unnecessary. */
-   if (evh->hwc_policy == E_HWC_POLICY_PLANES)
-     {
-        if (!e_video_hwc_planes_properties_commit(evh))
-          return;
-     }
-
-   if (evh->current_fb)
-     _e_video_hwc_buffer_show(evh, evh->current_fb, evh->current_fb->content_t);
-}
-
-static void
-_e_video_hwc_cb_evas_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   E_Video_Hwc *evh;
-
-   evh = data;
-   _e_video_hwc_show(evh);
-}
-
-static void
-_e_video_hwc_client_event_init(E_Video_Hwc *evh)
-{
-   evas_object_event_callback_add(evh->ec->frame, EVAS_CALLBACK_SHOW,
-                                  _e_video_hwc_cb_evas_show, evh);
-   E_LIST_HANDLER_APPEND(evh->ec_event_handler, E_EVENT_CLIENT_SHOW,
-                         _e_video_hwc_cb_client_show, evh);
-   E_LIST_HANDLER_APPEND(evh->ec_event_handler, E_EVENT_CLIENT_BUFFER_CHANGE,
-                         _e_video_hwc_cb_client_buffer_change, evh);
-}
-
 EINTERN E_Video_Comp_Iface *
 e_video_hwc_iface_create(E_Client_Video *ecv)
 {
@@ -1632,7 +1636,7 @@ e_video_hwc_iface_create(E_Client_Video *ecv)
 
    evh = _e_video_hwc_create(ec);
    if (!evh)
-       return NULL;
+     return NULL;
 
    _e_video_hwc_client_event_init(evh);
 
@@ -1659,12 +1663,6 @@ e_video_hwc_current_fb_update(E_Video_Hwc *evh)
    return _e_video_hwc_current_fb_update(evh);
 }
 
-EINTERN void
-e_video_hwc_show(E_Video_Hwc *evh)
-{
-   _e_video_hwc_show(evh);
-}
-
 EINTERN void
 e_video_hwc_wait_buffer_commit(E_Video_Hwc *evh)
 {
index 227198b4cbe2b4bc32a90a963541f2de46cff64f..8b2fe1f98f15cb00f76d7a8da3a46eeeb411609f 100644 (file)
@@ -97,7 +97,6 @@ struct _E_Video_Hwc
 };
 
 /* Functions for HWC */
-EINTERN void         e_video_hwc_show(E_Video_Hwc *evh);
 EINTERN void         e_video_hwc_wait_buffer_commit(E_Video_Hwc *evh);
 EINTERN void         e_video_hwc_client_mask_update(E_Video_Hwc *evh);
 EINTERN Eina_Bool    e_video_hwc_current_fb_update(E_Video_Hwc *evh);
index fe20ec798db7acf8a47d064366d90d7860ef0749..209e6fa413f2c051eaf51da93cf4c8c4cde8e779 100644 (file)
@@ -625,81 +625,6 @@ _e_video_hwc_planes_destroy(E_Video_Hwc_Planes *evhp)
    free(evhp);
 }
 
-static Eina_Bool
-_e_video_hwc_planes_cb_client_visibility_change(void *data, int type, void *event)
-{
-   E_Event_Remote_Surface_Provider *ev;
-   E_Client *ec, *offscreen_parent;
-   E_Video_Hwc_Planes *evhp;
-
-   evhp = data;
-   offscreen_parent = e_video_hwc_client_offscreen_parent_get(evhp->base.ec);
-   if (!offscreen_parent)
-     goto end;
-
-   ev = event;
-   ec = ev->ec;
-   if (offscreen_parent != ec)
-     goto end;
-
-   switch (ec->visibility.obscured)
-     {
-      case E_VISIBILITY_FULLY_OBSCURED:
-         _e_video_hwc_planes_cb_evas_hide(evhp, NULL, NULL, NULL);
-         break;
-      case E_VISIBILITY_UNOBSCURED:
-         e_video_hwc_show((E_Video_Hwc *)evhp);
-         break;
-      default:
-         VER("Not implemented", evhp->base.ec);
-         return ECORE_CALLBACK_PASS_ON;
-     }
-
-end:
-   return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool
-_e_video_hwc_planes_cb_topmost_client_visibility_change(void *data, int type, void *event)
-{
-   E_Event_Client *ev;
-   E_Client *ec, *topmost;
-   E_Video_Hwc_Planes *evhp;
-
-   evhp = data;
-   topmost = e_comp_wl_topmost_parent_get(evhp->base.ec);
-   if (!topmost)
-     goto end;
-
-   if (topmost == evhp->base.ec)
-     goto end;
-
-   ev = event;
-   ec = ev->ec;
-   if (topmost != ec)
-     goto end;
-
-   if (e_client_video_topmost_visibility_follow_get(evhp->base.ecv))
-     {
-        switch (ec->visibility.obscured)
-          {
-           case E_VISIBILITY_FULLY_OBSCURED:
-              VIN("follow_topmost_visibility: fully_obscured", ec);
-              _e_video_hwc_planes_cb_evas_hide(evhp, NULL, NULL, NULL);
-              break;
-           case E_VISIBILITY_UNOBSCURED:
-              VIN("follow_topmost_visibility: UNOBSCURED", ec);
-              e_video_hwc_show((E_Video_Hwc *)evhp);
-              break;
-           default:
-              return ECORE_CALLBACK_PASS_ON;
-          }
-     }
-
-end:
-   return ECORE_CALLBACK_PASS_ON;
-}
-
 static void
 _e_video_hwc_planes_ec_event_deinit(E_Video_Hwc_Planes *evhp)
 {
@@ -709,8 +634,6 @@ _e_video_hwc_planes_ec_event_deinit(E_Video_Hwc_Planes *evhp)
 
    evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_HIDE,
                                        _e_video_hwc_planes_cb_evas_hide, evhp);
-
-   E_FREE_LIST(evhp->base.ec_event_handler, ecore_event_handler_del);
 }
 
 const char *
@@ -817,11 +740,6 @@ _e_video_hwc_planes_ec_event_init(E_Video_Hwc_Planes *evhp, E_Client *ec)
 {
    evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_HIDE,
                                   _e_video_hwc_planes_cb_evas_hide, evhp);
-
-   E_LIST_HANDLER_APPEND(evhp->base.ec_event_handler, E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE,
-                         _e_video_hwc_planes_cb_client_visibility_change, evhp);
-   E_LIST_HANDLER_APPEND(evhp->base.ec_event_handler, E_EVENT_CLIENT_VISIBILITY_CHANGE,
-                         _e_video_hwc_planes_cb_topmost_client_visibility_change, evhp);
 }
 
 static void
index 50fac7ca0b2516d2a755ecfb8d9af2016f4503eb..e9d307ed1d539d444c8356faa94dbc6e2ac0b56e 100644 (file)
@@ -13,7 +13,6 @@ struct _E_Video_Hwc_Windows
 
    E_Hwc *hwc;
    E_Hwc_Window *hwc_window;
-   E_Comp_Wl_Hook *hook_subsurf_create;
 
    struct
      {
@@ -78,105 +77,6 @@ _e_video_destroy(E_Video_Hwc_Windows *evhw)
    free(evhw);
 }
 
-static Eina_Bool
-_e_video_cb_ec_visibility_change(void *data, int type, void *event)
-{
-   E_Event_Remote_Surface_Provider *ev;
-   E_Client *ec, *offscreen_parent;
-   E_Video_Hwc_Windows *evhw;
-
-   evhw = data;
-   offscreen_parent = e_video_hwc_client_offscreen_parent_get(evhw->base.ec);
-   if (!offscreen_parent)
-     goto end;
-
-   ev = event;
-   ec = ev->ec;
-   if (offscreen_parent != ec)
-     goto end;
-
-   switch (ec->visibility.obscured)
-   {
-       case E_VISIBILITY_FULLY_OBSCURED:
-           evas_object_hide(evhw->base.ec->frame);
-           break;
-       case E_VISIBILITY_UNOBSCURED:
-           evas_object_show(evhw->base.ec->frame);
-           break;
-       default:
-           VER("Not implemented", evhw->base.ec);
-           return ECORE_CALLBACK_PASS_ON;
-   }
-
-end:
-   return ECORE_CALLBACK_PASS_ON;
-}
-
-static void
-_e_video_ec_visibility_event_free(void *d EINA_UNUSED, E_Event_Client *ev)
-{
-   e_object_unref(E_OBJECT(ev->ec));
-   free(ev);
-}
-
-static void
-_e_video_ec_visibility_event_send(E_Client *ec)
-{
-   E_Event_Client *ev;
-   int obscured;
-
-   obscured = ec->visibility.obscured;
-   VIN("Signal visibility change event of video, type %d", ec, obscured);
-
-   ev = E_NEW(E_Event_Client, 1);
-   if (!ev) return;
-   ev->ec = ec;
-   e_object_ref(E_OBJECT(ec));
-   ecore_event_add(E_EVENT_CLIENT_VISIBILITY_CHANGE, ev,
-                   (Ecore_End_Cb)_e_video_ec_visibility_event_free, NULL);
-}
-
-static void
-_e_video_hwc_windows_ec_visibility_set(E_Client *ec, E_Visibility vis)
-{
-   if (ec->visibility.obscured == vis)
-     return;
-
-   ec->visibility.obscured = vis;
-   _e_video_ec_visibility_event_send(ec);
-}
-
-static Eina_Bool
-_e_video_cb_topmost_ec_visibility_change(void *data, int type, void *event)
-{
-   E_Video_Hwc_Windows *evhw;
-   E_Event_Client *ev;
-   E_Client *topmost;
-
-   ev = event;
-   evhw = data;
-   if (!e_client_video_topmost_visibility_follow_get(evhw->base.ecv))
-       goto end;
-
-   topmost = e_comp_wl_topmost_parent_get(evhw->base.ec);
-   if (!topmost) goto end;
-   if (topmost != ev->ec) goto end;
-   if (topmost == evhw->base.ec) goto end;
-
-   /* Update visibility of video client by changing visibility of topmost client */
-   _e_video_hwc_windows_ec_visibility_set(evhw->base.ec, topmost->visibility.obscured);
-
-end:
-   return ECORE_CALLBACK_PASS_ON;
-}
-
-static void
-_e_video_hwc_windows_ec_event_deinit(E_Video_Hwc_Windows *evhw)
-{
-   E_FREE_FUNC(evhw->hook_subsurf_create, e_comp_wl_hook_del);
-   E_FREE_LIST(evhw->base.ec_event_handler, ecore_event_handler_del);
-}
-
 const char *
 _e_video_hwc_windows_prop_name_get_by_id(E_Video_Hwc_Windows *evhw, unsigned int id)
 {
@@ -198,50 +98,12 @@ _e_video_hwc_windows_prop_name_get_by_id(E_Video_Hwc_Windows *evhw, unsigned int
    return NULL;
 }
 
-static void
-_e_video_hwc_windows_cb_hook_subsurface_create(void *data, E_Client *ec)
-{
-   E_Video_Hwc_Windows *evhw;
-   E_Client *topmost1, *topmost2;
-
-   evhw = data;
-   if (!e_client_video_topmost_visibility_follow_get(evhw->base.ecv))
-     return;
-
-   /* This is to raise an 'VISIBILITY_CHANGE' event to video client when its
-    * topmost ancestor is changed. The reason why it uses hook handler of
-    * creation of subsurface is that there is no event for like parent change,
-    * and being created subsurface that has common topmost parent means
-    * it implies topmost parent has been possibly changed. */
-   topmost1 = e_comp_wl_topmost_parent_get(ec);
-   topmost2 = e_comp_wl_topmost_parent_get(evhw->base.ec);
-   if (topmost1 && topmost2)
-     {
-        if (topmost1 == topmost2)
-          _e_video_hwc_windows_ec_visibility_set(evhw->base.ec, topmost1->visibility.obscured);
-     }
-}
-
-static void
-_e_video_hwc_windows_ec_event_init(E_Video_Hwc_Windows *evhw)
-{
-   evhw->hook_subsurf_create =
-      e_comp_wl_hook_add(E_COMP_WL_HOOK_SUBSURFACE_CREATE,
-                         _e_video_hwc_windows_cb_hook_subsurface_create, evhw);
-
-   E_LIST_HANDLER_APPEND(evhw->base.ec_event_handler, E_EVENT_REMOTE_SURFACE_PROVIDER_VISIBILITY_CHANGE,
-                         _e_video_cb_ec_visibility_change, evhw);
-   E_LIST_HANDLER_APPEND(evhw->base.ec_event_handler, E_EVENT_CLIENT_VISIBILITY_CHANGE,
-                         _e_video_cb_topmost_ec_visibility_change, evhw);
-}
-
 static void
 _e_video_hwc_windows_iface_destroy(E_Video_Hwc *evh)
 {
    E_Video_Hwc_Windows *evhw;
 
    evhw = (E_Video_Hwc_Windows *)evh;
-   _e_video_hwc_windows_ec_event_deinit(evhw);
    _e_video_destroy(evhw);
 }
 
@@ -451,7 +313,6 @@ e_video_hwc_windows_create(E_Output *output, E_Client *ec)
         return NULL;
      }
 
-   _e_video_hwc_windows_ec_event_init(evhw);
    _e_video_hwc_windows_iface_set(&evhw->base.backend);
 
    return (E_Video_Hwc *)evhw;