Modification for enlightenment version upgrade 0.20.0
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 7 Jan 2016 07:00:07 +0000 (16:00 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 21 Jan 2016 07:38:20 +0000 (16:38 +0900)
Change-Id: Ic37fdeffc0288baffab026caf372cb81cd7f8c8c

configure.ac
src/e_mod_config.c
src/e_mod_main.c
src/e_mod_main.h
src/e_mod_rotation_wl.c
src/e_mod_softkey.c
src/e_mod_stack.c
src/e_mod_visibility.c
src/e_mod_volume.c
src/e_mod_volume.h
src/e_mod_wl.c

index 0d004745646b7226f93e1e667a514b55fdbd744d..6723a22989d4dc9d9ce99e0dc15768d4720a2baa 100644 (file)
@@ -63,6 +63,11 @@ if test "x${have_wayland_only}" = "xyes"; then
   PKG_CHECK_MODULES([TZSH_SERVER], [tzsh-server])
 fi
 
+# for include e_comp_wl.h
+if test "x${have_wayland_only}" != "xno"; then
+  AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
+fi
+
 AC_CONFIG_FILES([Makefile
                 src/Makefile])
 AC_OUTPUT
index a26e45de84f207072283fce50eda0a0e6d964e02..7bfda8713ccfcb2b14ae28d4e92dacec901ce534 100644 (file)
@@ -17,7 +17,6 @@ _pol_conf_desk_add(Config *conf, E_Desk *desk)
    Config_Desk *d;
 
    d = E_NEW(Config_Desk, 1);
-   d->comp_num = desk->zone->comp->num;
    d->zone_num = desk->zone->num;
    d->x = desk->x;
    d->y = desk->y;
@@ -41,8 +40,7 @@ _pol_conf_desk_get(Config *conf, Config_Desk *d)
 
    EINA_LIST_FOREACH(conf->desks, l, d2)
      {
-        if ((d2->comp_num == d->comp_num) &&
-            (d2->zone_num == d->zone_num) &&
+        if ((d2->zone_num == d->zone_num) &&
             (d2->x == d->x) && (d2->y == d->y))
           {
              return d2;
@@ -132,7 +130,7 @@ _pol_cfd_data_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data
 
    EINA_LIST_FOREACH(cfdata->conf->desks, l, d)
      {
-        zone = e_comp_zone_number_get(e_comp, d->zone_num);
+        zone = e_comp_zone_number_get(d->zone_num);
         desk = e_desk_at_xy_get(zone, d->x, d->y);
         if (!desk) continue;
 
@@ -189,7 +187,6 @@ _pol_cfd_desk_list_update(E_Config_Dialog_Data *cfdata, E_Zone *zone)
         desk = zone->desks[i];
 
         d = E_NEW(Config_Desk, 1);
-        d->comp_num = zone->comp->num;
         d->zone_num = zone->num;
         d->x = desk->x;
         d->y = desk->y;
@@ -280,7 +277,6 @@ e_mod_pol_conf_init(Mod *mod)
 #undef D
 #define T Config_Desk
 #define D mod->conf_desk_edd
-   E_CONFIG_VAL(D, T, comp_num, INT);
    E_CONFIG_VAL(D, T, zone_num, UINT);
    E_CONFIG_VAL(D, T, x, INT);
    E_CONFIG_VAL(D, T, y, INT);
@@ -312,7 +308,7 @@ e_mod_pol_conf_init(Mod *mod)
         conf->use_softkey = 1;
         conf->softkey_size = 42;
 
-        zone = e_zone_current_get(e_comp);
+        zone = e_zone_current_get();
         desk = e_desk_current_get(zone);
         _pol_conf_desk_add(conf, desk);
      }
@@ -337,15 +333,14 @@ e_mod_pol_conf_shutdown(Mod *mod)
 }
 
 Config_Desk *
-e_mod_pol_conf_desk_get_by_nums(Config *conf, unsigned int comp_num, unsigned int zone_num, int x, int y)
+e_mod_pol_conf_desk_get_by_nums(Config *conf, unsigned int zone_num, int x, int y)
 {
    Eina_List *l;
    Config_Desk *d2;
 
    EINA_LIST_FOREACH(conf->desks, l, d2)
      {
-        if ((d2->comp_num == comp_num) &&
-            (d2->zone_num == zone_num) &&
+        if ((d2->zone_num == zone_num) &&
             (d2->x == x) && (d2->y == y))
           {
              return d2;
index 517e32a256d5593e6bd388472dd4d35fd5b372e5..3a686f48c0d9abcb9016ac74d928426ad1e9c119 100644 (file)
@@ -5,7 +5,7 @@
 #include "e_mod_wl.h"
 #endif
 
-EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Policy-Mobile" };
+E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Policy-Mobile" };
 
 Mod *_pol_mod = NULL;
 Eina_Hash *hash_pol_desks = NULL;
@@ -494,7 +494,6 @@ _pol_cb_zone_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
    for (i = 0; i < n; i++)
      {
         d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf,
-                                            zone->comp->num,
                                             zone->num,
                                             zone->desks[i]->x,
                                             zone->desks[i]->y);
@@ -589,7 +588,6 @@ _pol_cb_zone_desk_count_set(void *data EINA_UNUSED, int type EINA_UNUSED, void *
    for (i = 0; i < n; i++)
      {
         d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf,
-                                            zone->comp->num,
                                             zone->num,
                                             zone->desks[i]->x,
                                             zone->desks[i]->y);
@@ -664,7 +662,6 @@ _pol_cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
    ev = event;
    EINA_SAFETY_ON_NULL_RETURN_VAL(ev, ECORE_CALLBACK_PASS_ON);
 
-   e_mod_pol_client_window_opaque_set(ev->ec);
 #ifdef HAVE_WAYLAND_ONLY
    e_mod_pol_wl_client_add(ev->ec);
 #endif
@@ -785,7 +782,7 @@ e_mod_pol_desk_add(E_Desk *desk)
    eina_hash_add(hash_pol_desks, &desk, pd);
 
    /* add clients */
-   E_CLIENT_FOREACH(e_comp, ec)
+   E_CLIENT_FOREACH(ec)
      {
        if (pd->desk == ec->desk)
          _pol_client_add(ec);
@@ -1001,7 +998,7 @@ e_mod_pol_client_is_subsurface(E_Client *ec)
     }                                     \
   while (0)
 
-EAPI void *
+E_API void *
 e_modapi_init(E_Module *m)
 {
    Mod *mod;
@@ -1044,7 +1041,6 @@ e_modapi_init(E_Module *m)
         for (i = 0; i < n; i++)
           {
              d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf,
-                                                 e_comp->num,
                                                  zone->num,
                                                  zone->desks[i]->x,
                                                  zone->desks[i]->y);
@@ -1082,7 +1078,7 @@ e_modapi_init(E_Module *m)
    return mod;
 }
 
-EAPI int
+E_API int
 e_modapi_shutdown(E_Module *m)
 {
    Mod *mod = m->data;
@@ -1124,7 +1120,7 @@ e_modapi_shutdown(E_Module *m)
    return 1;
 }
 
-EAPI int
+E_API int
 e_modapi_save(E_Module *m)
 {
    Mod *mod = m->data;
index 29aa4b800fbd018aed67d567b1ff576e7c9e3d6b..228030b8c3c335dc3dcb946a8e7dbfb55517e557 100644 (file)
@@ -64,7 +64,6 @@ struct _Config_Match
 
 struct _Config_Desk
 {
-   unsigned int     comp_num;
    unsigned int     zone_num;
    int              x, y;
    int              enable;
@@ -102,7 +101,7 @@ extern Eina_Hash *hash_pol_clients;
 
 EINTERN void             e_mod_pol_conf_init(Mod *mod);
 EINTERN void             e_mod_pol_conf_shutdown(Mod *mod);
-EINTERN Config_Desk     *e_mod_pol_conf_desk_get_by_nums(Config *conf, unsigned int comp_num, unsigned int zone_num, int x, int y);
+EINTERN Config_Desk     *e_mod_pol_conf_desk_get_by_nums(Config *conf, unsigned int zone_num, int x, int y);
 EINTERN E_Config_Dialog *e_int_config_pol_mobile(Evas_Object *o EINA_UNUSED, const char *params EINA_UNUSED);
 EINTERN void             e_mod_pol_desk_add(E_Desk *desk);
 EINTERN void             e_mod_pol_desk_del(Pol_Desk *pd);
index c3b492ed6b8a40d3071d4844403a521ba412d346..6543913e1c8e7adc82239bfa9b9ff5a44a221fa3 100644 (file)
@@ -171,23 +171,18 @@ _e_tizen_rotation_set_available_angles_cb(struct wl_client *client,
                                           uint32_t angles)
 {
    E_Client *ec;
-   E_Pixmap *ep;
    Policy_Ext_Rotation *rot;
 
-   ep = wl_resource_get_user_data(resource);
-   EINA_SAFETY_ON_NULL_RETURN(ep);
+   ec = wl_resource_get_user_data(resource);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   rot = _policy_ext_rotation_get(ep);
+   rot = _policy_ext_rotation_get(ec->pixmap);
    EINA_SAFETY_ON_NULL_RETURN(rot);
 
    rot->available_angles = angles;
 
-   ec = e_pixmap_client_get(ep);
-   if (ec)
-     {
-        ec->e.fetch.rot.available_rots = 1;
-        EC_CHANGED(ec);
-     }
+   ec->e.fetch.rot.available_rots = 1;
+   EC_CHANGED(ec);
 }
 
 static void
@@ -195,24 +190,19 @@ _e_tizen_rotation_set_preferred_angle_cb(struct wl_client *client,
                                          struct wl_resource *resource,
                                          uint32_t angle)
 {
-   E_Pixmap *ep;
    Policy_Ext_Rotation *rot;
    E_Client *ec;
 
-   ep = wl_resource_get_user_data(resource);
-   EINA_SAFETY_ON_NULL_RETURN(ep);
+   ec = wl_resource_get_user_data(resource);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   rot = _policy_ext_rotation_get(ep);
+   rot = _policy_ext_rotation_get(ec->pixmap);
    EINA_SAFETY_ON_NULL_RETURN(rot);
 
    rot->preferred_angle = angle;
 
-   ec = e_pixmap_client_get(ep);
-   if (ec)
-     {
-        ec->e.fetch.rot.preferred_rot = 1;
-        EC_CHANGED(ec);
-     }
+   ec->e.fetch.rot.preferred_rot = 1;
+   EC_CHANGED(ec);
 }
 
 static void
@@ -221,46 +211,42 @@ _e_tizen_rotation_ack_angle_change_cb(struct wl_client *client,
                                       uint32_t serial)
 {
    E_Client *ec;
-   E_Pixmap *ep;
    Policy_Ext_Rotation *rot;
 
-   ep = wl_resource_get_user_data(resource);
-   EINA_SAFETY_ON_NULL_RETURN(ep);
+   ec = wl_resource_get_user_data(resource);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   rot = _policy_ext_rotation_get(ep);
+   rot = _policy_ext_rotation_get(ec->pixmap);
    EINA_SAFETY_ON_NULL_RETURN(rot);
 
-   ec = e_pixmap_client_get(ep);
-   if (ec)
+   if (rot->serial == serial) // rotation success
      {
-        if (rot->serial == serial) // rotation success
+        ec->e.state.rot.ang.prev = ec->e.state.rot.ang.curr;
+        ec->e.state.rot.ang.curr = TIZEN_ROTATION_ANGLE_TO_INT(rot->cur_angle);
+
+        if (TIZEN_ROTATION_ANGLE_TO_INT(rot->cur_angle) == ec->e.state.rot.ang.next)
           {
-             ec->e.state.rot.ang.prev = ec->e.state.rot.ang.curr;
-             ec->e.state.rot.ang.curr = TIZEN_ROTATION_ANGLE_TO_INT(rot->cur_angle);
+             ec->e.state.rot.ang.next = -1;
+             _e_client_rotation_list_remove(ec);
 
-             if (TIZEN_ROTATION_ANGLE_TO_INT(rot->cur_angle) == ec->e.state.rot.ang.next)
+             if (ec->e.state.rot.ang.reserve != -1)
                {
-                  ec->e.state.rot.ang.next = -1;
-                  _e_client_rotation_list_remove(ec);
-
-                  if (ec->e.state.rot.ang.reserve != -1)
-                    {
-                       e_client_rotation_set(ec, ec->e.state.rot.ang.reserve);
-                       ec->e.state.rot.ang.reserve = -1;
-                    }
-                  else if (ec->e.state.rot.pending_show)
-                    {
-                       ec->e.state.rot.pending_show = 0;
-                       evas_object_show(ec->frame);
-                    }
+                  e_client_rotation_set(ec, ec->e.state.rot.ang.reserve);
+                  ec->e.state.rot.ang.reserve = -1;
+               }
+             else if (ec->e.state.rot.pending_show)
+               {
+                  ec->e.state.rot.pending_show = 0;
+                  evas_object_show(ec->frame);
                }
-          }
-        else // rotation fail
-          {
-             int angle = e_client_rotation_recommend_angle_get(ec);
-             if (angle != -1) e_client_rotation_set(ec, angle);
           }
      }
+   else // rotation fail
+     {
+        int angle = e_client_rotation_recommend_angle_get(ec);
+        if (angle != -1) e_client_rotation_set(ec, angle);
+     }
+
    // check angle change serial
    rot->angle_change_done = EINA_TRUE;
 }
@@ -268,13 +254,13 @@ _e_tizen_rotation_ack_angle_change_cb(struct wl_client *client,
 static void
 _e_tizen_rotation_destroy(struct wl_resource *resource)
 {
-   E_Pixmap *ep;
+   E_Client *ec;
    Policy_Ext_Rotation *rot;
 
-   ep = wl_resource_get_user_data(resource);
-   EINA_SAFETY_ON_NULL_RETURN(ep);
+   ec = wl_resource_get_user_data(resource);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   rot = _policy_ext_rotation_get(ep);
+   rot = _policy_ext_rotation_get(ec->pixmap);
    EINA_SAFETY_ON_NULL_RETURN(rot);
 
    rot->rotation_list = eina_list_remove(rot->rotation_list, resource);
@@ -289,14 +275,13 @@ _e_tizen_policy_ext_get_rotation_cb(struct wl_client *client,
    int version = wl_resource_get_version(resource); // resource is tizen_policy_ext resource
    struct wl_resource *res;
    E_Client *ec;
-   E_Pixmap *ep;
    Policy_Ext_Rotation *rot;
 
-   ep = wl_resource_get_user_data(surface);
-   EINA_SAFETY_ON_NULL_RETURN(ep);
+   ec = wl_resource_get_user_data(surface);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
    // Add rotation info
-   rot = _policy_ext_rotation_get(ep);
+   rot = _policy_ext_rotation_get(ec->pixmap);
    EINA_SAFETY_ON_NULL_RETURN(rot);
 
    res = wl_resource_create(client, &tizen_rotation_interface, version, id);
@@ -309,28 +294,17 @@ _e_tizen_policy_ext_get_rotation_cb(struct wl_client *client,
    rot->rotation_list = eina_list_append(rot->rotation_list, res);
 
    wl_resource_set_implementation(res, &_e_tizen_rotation_interface,
-                                  ep, _e_tizen_rotation_destroy);
+                                  ec, _e_tizen_rotation_destroy);
 
-   ec = e_pixmap_client_get(ep);
-   if (ec)
-     {
-        ec->e.fetch.rot.support = 1;
-        EC_CHANGED(ec);
-     }
+   ec->e.fetch.rot.support = 1;
+   EC_CHANGED(ec);
 }
 
 static void
 _e_tizen_policy_ext_bind_cb(struct wl_client *client, void *data, uint32_t version, uint32_t id)
 {
-   E_Comp_Data *cdata;
    struct wl_resource *res;
 
-   if (!(cdata = data))
-     {
-        wl_client_post_no_memory(client);
-        return;
-     }
-
    if (!(res = wl_resource_create(client, &tizen_policy_ext_interface, version, id)))
      {
         ERR("Could not create scaler resource: %m");
@@ -338,7 +312,7 @@ _e_tizen_policy_ext_bind_cb(struct wl_client *client, void *data, uint32_t versi
         return;
      }
 
-   wl_resource_set_implementation(res, &_e_tizen_policy_ext_interface, cdata, NULL);
+   wl_resource_set_implementation(res, &_e_tizen_policy_ext_interface, NULL, NULL);
 }
 
 static void
@@ -375,7 +349,7 @@ _e_tizen_rotation_send_angle_change(E_Client *ec, int angle)
           break;
      }
 
-   serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    rot->angle_change_done = EINA_FALSE;
    rot->prev_angle = rot->cur_angle;
@@ -448,7 +422,7 @@ _e_client_rotation_zone_set(E_Zone *zone)
 
         if (ez != zone) continue;
 
-        EINA_LIST_REVERSE_FOREACH(zone->comp->clients, l, ec)
+        EINA_LIST_REVERSE_FOREACH(e_comp->clients, l, ec)
           {
              if((!ec->zone) || (ec->zone != zone)) continue;
 
@@ -483,7 +457,6 @@ _e_client_rotation_zone_set(E_Zone *zone)
 static void
 _e_client_rotation_change_done(void)
 {
-   E_Manager *m = NULL;
    E_Client *ec;
 
    if (rot.done_timer) ecore_timer_del(rot.done_timer);
@@ -508,13 +481,12 @@ _e_client_rotation_change_done(void)
    rot.list = NULL;
    rot.async_list = NULL;
 
-   m = e_manager_current_get();
    if (rot.screen_lock)
      {
         // do call comp_wl's screen unlock
         rot.screen_lock = EINA_FALSE;
      }
-   e_zone_rotation_update_done(e_util_zone_current_get(m));
+   e_zone_rotation_update_done(e_zone_current_get());
 }
 
 static Eina_Bool
@@ -1489,16 +1461,11 @@ Eina_Bool
 e_mod_rot_wl_init(void)
 {
 #ifdef HAVE_WAYLAND_ONLY
-   E_Comp_Data *cdata;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-
-   cdata = e_comp->wl_comp_data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->wl.disp, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl->wl.disp, EINA_FALSE);
 
-   if (!wl_global_create(cdata->wl.disp, &tizen_policy_ext_interface, 1,
-                         cdata, _e_tizen_policy_ext_bind_cb))
+   if (!wl_global_create(e_comp_wl->wl.disp, &tizen_policy_ext_interface, 1,
+                         NULL, _e_tizen_policy_ext_bind_cb))
      {
         ERR("Could not add tizen_policy_ext to wayland globals: %m");
         return EINA_FALSE;
index 09fe1c34b9ca64e7e3810d465eae4c58c39cc651..ff000c93bc6bd8f5a2c5e00094caaf853ea76da9 100644 (file)
@@ -33,7 +33,7 @@ _pol_softkey_iconify(E_Zone *zone, Eina_Bool all)
    desk = e_desk_current_get(zone);
    launcher = e_mod_pol_client_launcher_get(zone);
 
-   E_CLIENT_REVERSE_FOREACH(e_comp, ec)
+   E_CLIENT_REVERSE_FOREACH(ec)
      {
         if (e_client_util_ignored_get(ec)) continue;
         if (!e_client_util_desk_visible(ec, desk)) continue;
index 788ac62afb2fb0ff5e2151e48b02ab8511d5bdb0..388be01f8b17eb2278a7c38046b1d98705f2dca7 100644 (file)
@@ -78,7 +78,7 @@ _pol_stack_transient_for_apply(E_Client *ec)
 
    if (ec->transient_policy == E_TRANSIENT_ABOVE)
      {
-        top = e_client_top_get(ec->comp);
+        top = e_client_top_get();
         while (top)
           {
              if ((!ec->parent->transients) || (top == ec->parent))
index 9ac79e3f27b28872209c33230e9d0dafb801b217..a1993c10a142701133d37ec604cc71100967fd60 100644 (file)
@@ -186,7 +186,7 @@ e_mod_pol_zone_visibility_calc(E_Zone *zone)
         eina_tiler_rect_add(t, &r);
      }
 
-   E_CLIENT_REVERSE_FOREACH(zone->comp, ec)
+   E_CLIENT_REVERSE_FOREACH(ec)
      {
         if (e_object_is_del(E_OBJECT(ec))) continue;
         if (e_client_util_ignored_get(ec)) continue;
@@ -309,22 +309,3 @@ e_mod_pol_client_visibility_del(E_Client *ec)
 
    eina_hash_del_by_key(hash_pol_visibilities, &ec);
 }
-
-void
-e_mod_pol_client_window_opaque_set(E_Client *ec)
-{
-   int opaque = 0;
-
-   if (!ec) return;
-
-#ifdef HAVE_WAYLAND_ONLY
-   E_Comp_Wl_Client_Data *cdata;
-
-   if (!ec->pixmap) return;
-   if (!(cdata = (E_Comp_Wl_Client_Data *)e_pixmap_cdata_get(ec->pixmap))) return;
-
-   opaque = cdata->opaque_state;
-#endif
-
-   ec->visibility.opaque = opaque;
-}
index 25cd2e4977f824927627465240e7ce62c2a4cf8c..359cc9ea68255d483b5bf7b32a7e2cebbf7a51f4 100644 (file)
@@ -57,7 +57,7 @@ _volume_region_obj_cb_mouse_in(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, E
    Evas_Event_Mouse_In *e = event;
    uint32_t serial;
 
-   serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_pointer_send_enter(_volume_wl_ptr, serial, _volume_ec->comp_data->surface,
                          wl_fixed_from_int(e->canvas.x - _volume_ec->client.x),
                          wl_fixed_from_int(e->canvas.y - _volume_ec->client.y));
@@ -68,7 +68,7 @@ _volume_region_obj_cb_mouse_out(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
 {
    uint32_t serial;
 
-   serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_pointer_send_leave(_volume_wl_ptr, serial, _volume_ec->comp_data->surface);
 }
 
@@ -88,7 +88,7 @@ _volume_region_obj_cb_mouse_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
    Evas_Event_Mouse_Down *e = event;
    uint32_t serial;
 
-   serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_pointer_send_button(_volume_wl_ptr, serial, e->timestamp, e->button,
                           WL_POINTER_BUTTON_STATE_PRESSED);
 }
@@ -99,7 +99,7 @@ _volume_region_obj_cb_mouse_up(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, E
    Evas_Event_Mouse_Up *e = event;
    uint32_t serial;
 
-   serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_pointer_send_button(_volume_wl_ptr, serial, e->timestamp, e->button,
                           WL_POINTER_BUTTON_STATE_RELEASED);
 }
@@ -397,7 +397,7 @@ _volume_wl_pointer_resource_get(void)
    if (_volume_wl_ptr) goto end;
 
    wc = wl_resource_get_client(_volume_ec->comp_data->surface);
-   EINA_LIST_FOREACH(e_comp->wl_comp_data->ptr.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
 
index dd17531e4bc4c79e4c78c549e91677d94d9d2cbd..60067111364c285ba5af2acc766bcb4297a19c67 100644 (file)
@@ -5,6 +5,7 @@
 #ifdef HAVE_WAYLAND_ONLY
 
 #define E_COMP_WL
+#undef E_TYPEDEFS
 #include <e.h>
 
 EINTERN Eina_Bool     e_mod_volume_client_set(E_Client *ec);
index 74e547ff7092e47a358ead390c88f644ae009122..92acf372413797e663ce412626590e1cfebeea76 100644 (file)
@@ -148,14 +148,14 @@ _pol_wl_tzpol_get(struct wl_resource *res_tzpol)
 }
 
 static Pol_Wl_Surface *
-_pol_wl_tzpol_surf_find(Pol_Wl_Tzpol *tzpol, E_Pixmap *cp)
+_pol_wl_tzpol_surf_find(Pol_Wl_Tzpol *tzpol, E_Client *ec)
 {
    Eina_List *l;
    Pol_Wl_Surface *psurf;
 
    EINA_LIST_FOREACH(tzpol->psurfs, l, psurf)
      {
-        if (psurf->cp == cp)
+        if (psurf->ec == ec)
           return psurf;
      }
 
@@ -582,31 +582,25 @@ _pol_wl_tzsh_client_del(Pol_Wl_Tzsh_Client *tzsh_client)
 // Pol_Wl_Surface
 // --------------------------------------------------------
 static Pol_Wl_Surface *
-_pol_wl_surf_add(E_Pixmap *cp, struct wl_resource *res_tzpol)
+_pol_wl_surf_add(E_Client *ec, struct wl_resource *res_tzpol)
 {
    Pol_Wl_Surface *psurf = NULL;
-   E_Comp_Client_Data *cdata = NULL;
-   struct wl_resource *surf = NULL;
 
    Pol_Wl_Tzpol *tzpol;
 
    tzpol = _pol_wl_tzpol_get(res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN_VAL(tzpol, NULL);
 
-   psurf = _pol_wl_tzpol_surf_find(tzpol, cp);
+   psurf = _pol_wl_tzpol_surf_find(tzpol, ec);
    if (psurf) return psurf;
 
    psurf = E_NEW(Pol_Wl_Surface, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(psurf, NULL);
 
-   cdata = e_pixmap_cdata_get(cp);
-   if (cdata)
-     surf = cdata->wl_surface;
-
-   psurf->surf = surf;
+   psurf->surf = ec->comp_data->surface;
    psurf->tzpol = tzpol;
-   psurf->cp = cp;
-   psurf->ec = e_pixmap_client_get(cp);
+   psurf->cp = ec->pixmap;
+   psurf->ec = ec;
 
    tzpol->psurfs = eina_list_append(tzpol->psurfs, psurf);
 
@@ -633,7 +627,7 @@ _pol_wl_surf_client_set(E_Client *ec)
    it = eina_hash_iterator_data_new(polwl->tzpols);
    EINA_ITERATOR_FOREACH(it, tzpol)
      {
-        psurf = _pol_wl_tzpol_surf_find(tzpol, ec->pixmap);
+        psurf = _pol_wl_tzpol_surf_find(tzpol, ec);
         if (psurf)
           {
              if ((psurf->ec) && (psurf->ec != ec))
@@ -660,7 +654,8 @@ _pol_wl_surf_client_set(E_Client *ec)
 static E_Pixmap *
 _pol_wl_e_pixmap_get_from_id(struct wl_client *client, uint32_t id)
 {
-   E_Pixmap *cp = NULL, *cp2;
+   E_Pixmap *cp;
+   E_Client *ec;
    struct wl_resource *res_surf;
 
    res_surf = wl_client_get_object(client, id);
@@ -670,22 +665,22 @@ _pol_wl_e_pixmap_get_from_id(struct wl_client *client, uint32_t id)
         return NULL;
      }
 
-   cp = wl_resource_get_user_data(res_surf);
-   if (!cp)
+   ec = wl_resource_get_user_data(res_surf);
+   if (!ec)
      {
         ERR("Could not get surface's user data");
         return NULL;
      }
 
    /* check E_Pixmap */
-   cp2 = e_pixmap_find(E_PIXMAP_TYPE_WL, (uintptr_t)res_surf);
-   if (cp2 != cp)
+   cp = e_pixmap_find(E_PIXMAP_TYPE_WL, (uintptr_t)res_surf);
+   if (cp != ec->pixmap)
      {
         ELOGF("POLWL",
               "CRI ERR!!|cp2:0x%08x|ec2:0x%08x|res_surf:0x%08x",
-              cp, e_pixmap_client_get(cp),
-              (unsigned int)cp2,
-              (unsigned int)e_pixmap_client_get(cp2),
+              ec->pixmap, ec,
+              (unsigned int)cp,
+              (unsigned int)e_pixmap_client_get(cp),
               (unsigned int)res_surf);
         return NULL;
      }
@@ -747,14 +742,14 @@ _tzvis_iface_cb_vis_destroy(struct wl_resource *res_tzvis)
 static void
 _tzpol_iface_cb_vis_get(struct wl_client *client, struct wl_resource *res_tzpol, uint32_t id, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
+   E_Client *ec;
    Pol_Wl_Surface *psurf;
    struct wl_resource *res_tzvis;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   psurf = _pol_wl_surf_add(cp, res_tzpol);
+   psurf = _pol_wl_surf_add(ec, res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(psurf);
 
    res_tzvis = wl_resource_create(client,
@@ -915,14 +910,14 @@ _tzpol_iface_cb_pos_destroy(struct wl_resource *res_tzpos)
 static void
 _tzpol_iface_cb_pos_get(struct wl_client *client, struct wl_resource *res_tzpol, uint32_t id, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
+   E_Client *ec;
    Pol_Wl_Surface *psurf;
    struct wl_resource *res_tzpos;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   psurf = _pol_wl_surf_add(cp, res_tzpol);
+   psurf = _pol_wl_surf_add(ec, res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(psurf);
 
    res_tzpos = wl_resource_create(client,
@@ -982,13 +977,9 @@ e_mod_pol_wl_position_send(E_Client *ec)
 static void
 _tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
-
-   ec = e_pixmap_client_get(cp);
+   ec = wl_resource_get_user_data(surf);
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
@@ -1005,13 +996,9 @@ _tzpol_iface_cb_activate(struct wl_client *client EINA_UNUSED, struct wl_resourc
 static void
 _tzpol_iface_cb_raise(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
-
-   ec = e_pixmap_client_get(cp);
+   ec = wl_resource_get_user_data(surf);
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
@@ -1024,13 +1011,9 @@ _tzpol_iface_cb_raise(struct wl_client *client EINA_UNUSED, struct wl_resource *
 static void
 _tzpol_iface_cb_lower(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec, *below = NULL;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
-
-   ec = e_pixmap_client_get(cp);
+   ec = wl_resource_get_user_data(surf);
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
@@ -1088,54 +1071,30 @@ _tzpol_iface_cb_lower_by_res_id(struct wl_client *client EINA_UNUSED, struct wl_
 static void
 _tzpol_iface_cb_focus_skip_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   ec = e_pixmap_client_get(cp);
-   if (ec)
+   if (ec->icccm.accepts_focus)
      {
-        if (ec->icccm.accepts_focus)
-          {
-             ec->icccm.accepts_focus = ec->icccm.take_focus = 0;
-             EC_CHANGED(ec);
-          }
-     }
-   else
-     {
-        cdata = e_pixmap_cdata_get(cp);
-        EINA_SAFETY_ON_NULL_RETURN(cdata);
-        cdata->accepts_focus = 0;
+        ec->icccm.accepts_focus = ec->icccm.take_focus = 0;
+        EC_CHANGED(ec);
      }
 }
 
 static void
 _tzpol_iface_cb_focus_skip_unset(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   ec = e_pixmap_client_get(cp);
-   if (ec)
-     {
-        if (!ec->icccm.accepts_focus)
-          {
-             ec->icccm.accepts_focus = ec->icccm.take_focus = 1;
-             EC_CHANGED(ec);
-          }
-     }
-   else
+   if (!ec->icccm.accepts_focus)
      {
-        cdata = e_pixmap_cdata_get(cp);
-        EINA_SAFETY_ON_NULL_RETURN(cdata);
-        cdata->accepts_focus = 1;
+        ec->icccm.accepts_focus = ec->icccm.take_focus = 1;
+        EC_CHANGED(ec);
      }
 }
 
@@ -1145,15 +1104,11 @@ _tzpol_iface_cb_focus_skip_unset(struct wl_client *client EINA_UNUSED, struct wl
 static void
 _tzpol_iface_cb_role_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf, const char *role)
 {
-   E_Pixmap *cp;
    E_Client *ec;
 
    EINA_SAFETY_ON_NULL_RETURN(role);
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
-
-   ec = e_pixmap_client_get(cp);
+   ec = wl_resource_get_user_data(surf);
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
@@ -1191,13 +1146,11 @@ _tzpol_iface_cb_role_set(struct wl_client *client EINA_UNUSED, struct wl_resourc
 static void
 _tzpol_iface_cb_type_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf, uint32_t type)
 {
-   E_Pixmap *cp;
    E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
    E_Window_Type win_type;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
    switch (type)
      {
@@ -1206,34 +1159,18 @@ _tzpol_iface_cb_type_set(struct wl_client *client EINA_UNUSED, struct wl_resourc
       default: return;
      }
 
-   ec = e_pixmap_client_get(cp);
-
    ELOGF("TZPOL",
          "TYPE_SET |win:0x%08x|s:0x%08x|res_tzpol:0x%08x|tizen_win_type:%d, e_win_type:%d NOTI",
-         cp, ec,
-         ec ? (unsigned int)e_client_util_win_get(ec) : 0,
+         ec->pixmap, ec,
+         (unsigned int)e_client_util_win_get(ec),
          (unsigned int)surf,
          (unsigned int)res_tzpol,
          type, win_type);
 
-   if (ec)
-     {
-        ec->netwm.type = win_type;
-        if (win_type == E_WINDOW_TYPE_NOTIFICATION)
-          ec->layer = E_LAYER_CLIENT_NOTIFICATION_LOW;
-        EC_CHANGED(ec);
-     }
-   else
-     {
-        cdata = e_pixmap_cdata_get(cp);
-        EINA_SAFETY_ON_NULL_RETURN(cdata);
-
-        cdata->win_type = win_type;
-        cdata->fetch.win_type = 1;
-
-        cdata->layer = E_LAYER_CLIENT_NOTIFICATION_LOW;
-        cdata->fetch.layer = 1;
-     }
+   ec->netwm.type = win_type;
+   if (win_type == E_WINDOW_TYPE_NOTIFICATION)
+     ec->layer = E_LAYER_CLIENT_NOTIFICATION_LOW;
+   EC_CHANGED(ec);
 }
 // --------------------------------------------------------
 // conformant
@@ -1241,92 +1178,54 @@ _tzpol_iface_cb_type_set(struct wl_client *client EINA_UNUSED, struct wl_resourc
 static void
 _tzpol_iface_cb_conformant_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
    Pol_Wl_Surface *psurf;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   psurf = _pol_wl_surf_add(cp, res_tzpol);
+   psurf = _pol_wl_surf_add(ec, res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(psurf);
 
-   ec = e_pixmap_client_get(cp);
-   if (ec)
+   if (!ec->comp_data->conformant)
      {
-        if (!ec->comp_data->conformant)
-          {
-             ec->comp_data->conformant = 1;
-             EC_CHANGED(ec);
-          }
-     }
-   else
-     {
-        cdata = e_pixmap_cdata_get(cp);
-        EINA_SAFETY_ON_NULL_RETURN(cdata);
-        cdata->conformant = 1;
+        ec->comp_data->conformant = 1;
+        EC_CHANGED(ec);
      }
 }
 
 static void
 _tzpol_iface_cb_conformant_unset(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
    Pol_Wl_Surface *psurf;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   psurf = _pol_wl_surf_add(cp, res_tzpol);
+   psurf = _pol_wl_surf_add(ec, res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(psurf);
 
-   ec = e_pixmap_client_get(cp);
-   if (ec)
+   if (ec->comp_data->conformant)
      {
-        if (ec->comp_data->conformant)
-          {
-             ec->comp_data->conformant = 0;
-             EC_CHANGED(ec);
-          }
-     }
-   else
-     {
-        cdata = e_pixmap_cdata_get(cp);
-        EINA_SAFETY_ON_NULL_RETURN(cdata);
-        cdata->conformant = 0;
+        ec->comp_data->conformant = 0;
+        EC_CHANGED(ec);
      }
 }
 
 static void
 _tzpol_iface_cb_conformant_get(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
    Pol_Wl_Surface *psurf;
-   unsigned char conformant;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   psurf = _pol_wl_surf_add(cp, res_tzpol);
+   psurf = _pol_wl_surf_add(ec, res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(psurf);
 
-   ec = e_pixmap_client_get(cp);
-   if (ec)
-     conformant = ec->comp_data->conformant;
-   else
-     {
-        cdata = e_pixmap_cdata_get(cp);
-        EINA_SAFETY_ON_NULL_RETURN(cdata);
-
-        conformant = cdata->conformant;
-     }
-
-   tizen_policy_send_conformant(res_tzpol, surf, conformant);
+   tizen_policy_send_conformant(res_tzpol, surf, ec->comp_data->conformant);
 }
 
 void
@@ -1394,21 +1293,16 @@ _tzpol_notilv_set(E_Client *ec, int lv)
 static void
 _tzpol_iface_cb_notilv_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf, int32_t lv)
 {
-   E_Pixmap *cp;
    E_Client *ec;
    Pol_Wl_Surface *psurf;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   psurf = _pol_wl_surf_add(cp, res_tzpol);
+   psurf = _pol_wl_surf_add(ec, res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(psurf);
 
-   ec = e_pixmap_client_get(cp);
-   if (ec)
-     _tzpol_notilv_set(ec, lv);
-   else
-     psurf->pending_notilv = EINA_TRUE;
+   _tzpol_notilv_set(ec, lv);
 
    psurf->notilv = lv;
 
@@ -1456,17 +1350,11 @@ _pol_wl_parent_surf_set(E_Client *ec, struct wl_resource *parent_surf)
 
    if (parent_surf)
      {
-        if (!(pp = wl_resource_get_user_data(parent_surf)))
+        if (!(pc = wl_resource_get_user_data(parent_surf)))
           {
-             ERR("Could not get parent res pixmap");
+             ERR("Could not get parent res e_client");
              return;
           }
-
-        pwin = e_pixmap_window_get(pp);
-
-        /* find the parent client */
-        if (!(pc = e_pixmap_client_get(pp)))
-          pc = e_pixmap_find_client(E_PIXMAP_TYPE_WL, pwin);
      }
 
    e_mod_pol_stack_transient_for_set(ec, pc);
@@ -1535,10 +1423,10 @@ _tzpol_iface_cb_transient_for_unset(struct wl_client *client EINA_UNUSED, struct
 static void
 _tzpol_iface_cb_win_scrmode_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf, uint32_t mode)
 {
-   E_Pixmap *cp;
+   E_Client *ec;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
    e_mod_pol_wl_win_scrmode_apply();
 
@@ -1631,21 +1519,12 @@ _tzpol_iface_cb_subsurface_get(struct wl_client *client, struct wl_resource *res
 static void
 _tzpol_iface_cb_opaque_state_set(struct wl_client *client, struct wl_resource *resource, struct wl_resource *surface, int32_t state)
 {
-   E_Pixmap *ep;
    E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
-
-   ep = wl_resource_get_user_data(surface);
-   EINA_SAFETY_ON_NULL_RETURN(ep);
 
-   cdata = e_pixmap_cdata_get(ep);
-   EINA_SAFETY_ON_NULL_RETURN(cdata);
-
-   cdata->opaque_state = state;
+   ec = wl_resource_get_user_data(surface);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   ec = e_pixmap_client_get(ep);
-   if (ec)
-     e_mod_pol_client_window_opaque_set(ec);
+   ec->visibility.opaque = state;
 }
 
 // --------------------------------------------------------
@@ -1654,13 +1533,9 @@ _tzpol_iface_cb_opaque_state_set(struct wl_client *client, struct wl_resource *r
 static void
 _tzpol_iface_cb_iconify(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
-
-   ec = e_pixmap_client_get(cp);
+   ec = wl_resource_get_user_data(surf);
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
@@ -1672,13 +1547,9 @@ _tzpol_iface_cb_iconify(struct wl_client *client EINA_UNUSED, struct wl_resource
 static void
 _tzpol_iface_cb_uniconify(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol EINA_UNUSED, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
    E_Client *ec;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
-
-   ec = e_pixmap_client_get(cp);
+   ec = wl_resource_get_user_data(surf);
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->frame);
 
@@ -1763,17 +1634,16 @@ e_mod_pol_wl_eval_pre_new_client(E_Client *ec)
 static void
 _tzpol_iface_cb_aux_hint_add(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf, int32_t id, const char *name, const char *value)
 {
-   E_Pixmap *cp;
-   E_Comp_Wl_Client_Data *cdata;
+   E_Client *ec;
    Eina_List *l;
    E_Comp_Wl_Aux_Hint *hint;
    Eina_Bool res = EINA_FALSE;
 
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   res = e_hints_aux_hint_add_with_pixmap(cp, id, name, value);
+   res = e_hints_aux_hint_add_with_pixmap(ec->pixmap, id, name, value);
 
    ELOGF("TZPOL", "HINT_ADD|res_tzpol:0x%08x|id:%d, name:%s, val:%s, res:%d", NULL, NULL, (unsigned int)res_tzpol, id, name, value, res);
 
@@ -1784,16 +1654,15 @@ _tzpol_iface_cb_aux_hint_add(struct wl_client *client EINA_UNUSED, struct wl_res
 static void
 _tzpol_iface_cb_aux_hint_change(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf, int32_t id, const char *value)
 {
-   E_Pixmap *cp;
-   E_Comp_Wl_Client_Data *cdata;
+   E_Client *ec;
    Eina_List *l;
    E_Comp_Wl_Aux_Hint *hint;
    Eina_Bool res = EINA_FALSE;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   res = e_hints_aux_hint_change_with_pixmap(cp, id, value);
+   res = e_hints_aux_hint_change_with_pixmap(ec->pixmap, id, value);
 
    ELOGF("TZPOL", "HINT_CHANGE|res_tzpol:0x%08x|id:%d, val:%s, result:%d", NULL, NULL,  (unsigned int)res_tzpol, id, value, res);
 
@@ -1804,23 +1673,22 @@ _tzpol_iface_cb_aux_hint_change(struct wl_client *client EINA_UNUSED, struct wl_
 static void
 _tzpol_iface_cb_aux_hint_del(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf, int32_t id)
 {
-   E_Pixmap *cp;
-   E_Comp_Wl_Client_Data *cdata;
+   E_Client *ec;
    Eina_List *l, *ll;
    E_Comp_Wl_Aux_Hint *hint;
    unsigned int res = -1;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   res = e_hints_aux_hint_del_with_pixmap(cp, id);
+   res = e_hints_aux_hint_del_with_pixmap(ec->pixmap, id);
    ELOGF("TZPOL", "HINT_DEL|res_tzpol:0x%08x|id:%d, result:%d", NULL, NULL,  (unsigned int)res_tzpol, id, res);
 }
 
 static void
 _tzpol_iface_cb_supported_aux_hints_get(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzpol, struct wl_resource *surf)
 {
-   E_Pixmap *cp;
+   E_Client *ec;
    const Eina_List *hints_list;
    const Eina_List *l;
    struct wl_array hints;
@@ -1828,8 +1696,8 @@ _tzpol_iface_cb_supported_aux_hints_get(struct wl_client *client EINA_UNUSED, st
    int len;
    char *p;
 
-   cp = wl_resource_get_user_data(surf);
-   EINA_SAFETY_ON_NULL_RETURN(cp);
+   ec = wl_resource_get_user_data(surf);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
 
    hints_list = e_hints_aux_hint_supported_get();
 
@@ -1847,7 +1715,7 @@ _tzpol_iface_cb_supported_aux_hints_get(struct wl_client *client EINA_UNUSED, st
    tizen_policy_send_supported_aux_hints(res_tzpol, surf, &hints, eina_list_count(hints_list));
    ELOGF("TZPOL",
          "SEND     |res_tzpol:0x%08x|supported_hints size:%d",
-         cp, NULL,
+         ec->pixmap, ec,
          (unsigned int)res_tzpol,
          eina_list_count(hints_list));
    wl_array_release(&hints);
@@ -2265,7 +2133,7 @@ _tzsh_iface_cb_reg_create(struct wl_client *client, struct wl_resource *res_tzsh
    tzsh_reg = E_NEW(Pol_Wl_Tzsh_Region, 1);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_reg);
 
-   e_zone_useful_geometry_get(e_zone_current_get(e_comp),
+   e_zone_useful_geometry_get(e_zone_current_get(),
                               NULL, NULL, &zw, &zh);
 
    tz = eina_tiler_new(zw, zh);
@@ -2680,19 +2548,15 @@ e_mod_pol_wl_aux_hint_init(void)
 Eina_Bool
 e_mod_pol_wl_init(void)
 {
-   E_Comp_Data *cdata;
    struct wl_global *global;
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
-
-   cdata = e_comp->wl_comp_data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(cdata, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(cdata->wl.disp, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl->wl.disp, EINA_FALSE);
 
    polwl = E_NEW(Pol_Wl, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(polwl, EINA_FALSE);
 
-   global = wl_global_create(cdata->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_policy_interface,
                              1,
                              NULL,
@@ -2700,7 +2564,7 @@ e_mod_pol_wl_init(void)
    EINA_SAFETY_ON_NULL_GOTO(global, err);
    polwl->globals = eina_list_append(polwl->globals, global);
 
-   global = wl_global_create(cdata->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_ws_shell_interface,
                              1,
                              NULL,