Revert "Apply e_comp_get() / e_comp_wl_get()" 03/317103/1
authorjinbong.lee <jinbong.lee@samsung.com>
Tue, 3 Sep 2024 15:54:11 +0000 (00:54 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 4 Sep 2024 04:38:07 +0000 (13:38 +0900)
This reverts commit 88e05e4a692a85640717938ed22c2e80deb2d10e.

Change-Id: Ifba99400de77441eb5eb34707cf89d8301b5170b

81 files changed:
src/bin/compmgr/e_comp_canvas.c
src/bin/compmgr/e_comp_canvas_intern.h
src/bin/compmgr/e_comp_object.c
src/bin/compmgr/e_egl_sync.c
src/bin/core/e_client.c
src/bin/core/e_desk.c
src/bin/core/e_desk_area.c
src/bin/core/e_pixmap.c
src/bin/core/e_zone.c
src/bin/debug/e_info_server.c
src/bin/debug/e_test_helper.c
src/bin/displaymgr/e_hwc.c
src/bin/displaymgr/e_hwc_planes.c
src/bin/displaymgr/e_hwc_window.c
src/bin/displaymgr/e_hwc_window_queue.c
src/bin/displaymgr/e_hwc_windows.c
src/bin/displaymgr/e_output.c
src/bin/displaymgr/e_plane.c
src/bin/displaymgr/e_plane_renderer.c
src/bin/displaymgr/e_scale.c
src/bin/displaymgr/video/e_video_hwc.c
src/bin/e_comp_screen.c
src/bin/e_main.c
src/bin/inputmgr/e_devicemgr.c
src/bin/inputmgr/e_devicemgr_input.c
src/bin/inputmgr/e_devicemgr_inputgen.c
src/bin/inputmgr/e_keyrouter.c
src/bin/inputmgr/e_keyrouter_events.c
src/bin/log/e_video_debug.c
src/bin/server/e_blender.c
src/bin/server/e_blur.c
src/bin/server/e_blur_video_capture.c
src/bin/server/e_comp_wl.c
src/bin/server/e_comp_wl_capture.c
src/bin/server/e_comp_wl_data.c
src/bin/server/e_comp_wl_input.c
src/bin/server/e_comp_wl_intern.h
src/bin/server/e_comp_wl_renderer.c
src/bin/server/e_comp_wl_rsm.c
src/bin/server/e_comp_wl_screenshooter.c
src/bin/server/e_comp_wl_shell.c
src/bin/server/e_comp_wl_subsurface.c
src/bin/server/e_comp_wl_tbm.c
src/bin/server/e_comp_wl_tizen_hwc.c
src/bin/server/e_comp_wl_video.c
src/bin/server/e_comp_wl_video_buffer.c
src/bin/server/e_comp_wl_viewport.c
src/bin/server/e_compositor.c
src/bin/server/e_devicemgr_wl.c
src/bin/server/e_dpms.c
src/bin/server/e_eom.c
src/bin/server/e_explicit_sync.c
src/bin/server/e_foreign_shell.c
src/bin/server/e_keyrouter_wl.c
src/bin/server/e_linux_dmabuf.c
src/bin/server/e_policy_wl.c
src/bin/server/e_presentation_time.c
src/bin/server/e_screen_rotation.c
src/bin/server/e_server.c
src/bin/server/e_tbm_gbm_server.c
src/bin/server/e_tizen_screen_manager.c
src/bin/server/e_tizen_surface_shm.c
src/bin/server/e_video_shell.c
src/bin/server/e_wtz_shell.c
src/bin/server/e_wtz_shell_intern.h
src/bin/server/e_xdg_shell_v6.c
src/bin/server/e_xdg_shell_v6_intern.h
src/bin/windowmgr/e_dnd.c
src/bin/windowmgr/e_focus_policy_history.c
src/bin/windowmgr/e_hints.c
src/bin/windowmgr/e_magnifier.c
src/bin/windowmgr/e_pointer.c
src/bin/windowmgr/e_policy.c
src/bin/windowmgr/e_policy_conformant.c
src/bin/windowmgr/services/e_service_cbhm.c
src/bin/windowmgr/services/e_service_kvm.c
src/bin/windowmgr/services/e_service_launcher.c
src/bin/windowmgr/services/e_service_quickpanel.c
src/bin/windowmgr/services/e_service_region.c
src/bin/windowmgr/services/e_service_volume.c
src/modules/bufferqueue/e_mod_main.c

index c5fd0cf915906ffb0d4627ba5deb397ad0a281b3..6288d80d81997b76777c8f2375f839980f608599 100644 (file)
@@ -19,11 +19,7 @@ static void
 _e_comp_canvas_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
 {
    E_Client *ec;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
-
-   EINA_LIST_FREE(comp->post_updates, ec)
+   EINA_LIST_FREE(e_comp->post_updates, ec)
      {
         ec->on_post_updates = EINA_FALSE;
         if (!e_object_is_del(E_OBJECT(ec)))
@@ -31,7 +27,7 @@ _e_comp_canvas_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *ev
         e_object_unref(E_OBJECT(ec));
      }
 
-   EINA_LIST_FREE(comp->render_list, ec)
+   EINA_LIST_FREE(e_comp->render_list, ec)
      {
         ec->on_render_list = EINA_FALSE;
         e_object_unref(E_OBJECT(ec));
@@ -58,12 +54,8 @@ _e_comp_canvas_cb_zone_sort(const void *data1, const void *data2)
 static void
 _e_comp_canvas_resize(Ecore_Evas *ee EINA_UNUSED)
 {
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
-
-   ecore_evas_geometry_get(ee, NULL, NULL, &comp->w, &comp->h);
-   e_comp_screen_e_screens_setup(e_comp_screen_get(), comp->w, comp->h);
+   ecore_evas_geometry_get(ee, NULL, NULL, &e_comp->w, &e_comp->h);
+   e_comp_screen_e_screens_setup(e_comp_screen_get(), e_comp->w, e_comp->h);
    e_comp_canvas_update();
 }
 
@@ -72,27 +64,20 @@ _e_comp_canvas_prerender(Ecore_Evas *ee EINA_UNUSED)
 {
    E_Comp_Cb cb;
    Eina_List *l;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
 
-   EINA_LIST_FOREACH(comp->pre_render_cbs, l, cb)
+   EINA_LIST_FOREACH(e_comp->pre_render_cbs, l, cb)
      cb();
 }
 
 static Eina_Bool
 _e_comp_cb_compositor_enabled()
 {
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return EINA_FALSE;
-
    // canvas is not updated if there were no window or no obj changes on canvas by evas calc.
    // it happens sometimes after hwc end, than force canvas render
    DBG("Compositor Enabled");
 
-   if (comp->evas)
-     evas_damage_rectangle_add(comp->evas, 0, 0, comp->w, comp->h);
+   if (e_comp->evas)
+     evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->w, e_comp->h);
 
    return ECORE_CALLBACK_PASS_ON;
 }
@@ -108,16 +93,13 @@ e_comp_canvas_init(int w, int h)
    int color[4] = {0, 0, 0, 255};
    E_Zone *zone;
    E_Tizen_Screen *tizen_screen;
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
 
    TRACE_DS_BEGIN(COMP_CANVAS:INIT);
 
-   comp->evas = ecore_evas_get(comp->ee);
-   comp->canvas = e_canvas_create(comp->evas);
-   comp->w = w;
-   comp->h = h;
+   e_comp->evas = ecore_evas_get(e_comp->ee);
+   e_comp->canvas = e_canvas_create(e_comp->evas);
+   e_comp->w = w;
+   e_comp->h = h;
 
    if (e_config)
      {
@@ -130,9 +112,9 @@ e_comp_canvas_init(int w, int h)
           opmode = E_VIEW_RENDER_COPY;
      }
 
-   layer_tree = e_canvas_layer_view_tree_get(comp->canvas, E_CANVAS_LAYER_BOTTOM);
-   rect = e_view_rect_create(layer_tree, comp->w, comp->h, color);
-   comp->bg_blank_view = view = e_view_rect_view_get(rect);
+   layer_tree = e_canvas_layer_view_tree_get(e_comp->canvas, E_CANVAS_LAYER_BOTTOM);
+   rect = e_view_rect_create(layer_tree, e_comp->w, e_comp->h, color);
+   e_comp->bg_blank_view = view = e_view_rect_view_get(rect);
    e_view_position_set(view, 0, 0);
 
    if (opmode != e_view_render_op_get(view))
@@ -141,12 +123,12 @@ e_comp_canvas_init(int w, int h)
    e_view_name_set(view, "comp->bg_blank_view");
    e_view_show(view);
 
-   ecore_evas_name_class_set(comp->ee, "E", "Comp_EE");
-   ecore_evas_show(comp->ee);
+   ecore_evas_name_class_set(e_comp->ee, "E", "Comp_EE");
+   ecore_evas_show(e_comp->ee);
 
-   evas_event_callback_add(comp->evas, EVAS_CALLBACK_RENDER_POST, _e_comp_canvas_render_post, NULL);
+   evas_event_callback_add(e_comp->evas, EVAS_CALLBACK_RENDER_POST, _e_comp_canvas_render_post, NULL);
 
-   comp->ee_win = ecore_evas_window_get(comp->ee);
+   e_comp->ee_win = ecore_evas_window_get(e_comp->ee);
 
    screens = (Eina_List *)e_comp_screen_e_screens_get(e_comp_screen_get());
    if (screens)
@@ -164,7 +146,7 @@ e_comp_canvas_init(int w, int h)
      }
    else
      {
-        zone = e_zone_screen_new(0, comp->w, comp->h);
+        zone = e_zone_screen_new(0, e_comp->w, e_comp->h);
         tizen_screen = e_tizen_screen_create(zone);
         printf("@@@ NEW ZONE = %p, %p\n", zone, tizen_screen);
      }
@@ -174,8 +156,8 @@ e_comp_canvas_init(int w, int h)
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _e_comp_cb_zone_change, NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_COMPOSITOR_ENABLE,    _e_comp_cb_compositor_enabled, NULL);
 
-   ecore_evas_callback_pre_render_set(comp->ee, _e_comp_canvas_prerender);
-   ecore_evas_callback_resize_set(comp->ee, _e_comp_canvas_resize);
+   ecore_evas_callback_pre_render_set(e_comp->ee, _e_comp_canvas_prerender);
+   ecore_evas_callback_resize_set(e_comp->ee, _e_comp_canvas_resize);
 
    TRACE_DS_END();
    return EINA_TRUE;
@@ -184,31 +166,25 @@ e_comp_canvas_init(int w, int h)
 E_API E_Canvas *
 e_comp_canvas_get(void)
 {
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
 
-   return comp->canvas;
+   return e_comp->canvas;
 }
 
 EINTERN void
 e_comp_canvas_clear(void)
 {
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN(comp);
-
    E_FREE_LIST(handlers, ecore_event_handler_del);
 
-   e_view_destroy(comp->bg_blank_view);
-   e_canvas_destroy(comp->canvas);
-   evas_event_freeze(comp->evas);
+   e_view_destroy(e_comp->bg_blank_view);
+   e_canvas_destroy(e_comp->canvas);
+   evas_event_freeze(e_comp->evas);
    edje_freeze();
 
-   E_FREE_FUNC(comp->fps_fg, e_view_destroy);
-   E_FREE_FUNC(comp->fps_bg, e_view_destroy);
-   E_FREE_FUNC(comp->autoclose.rect, evas_object_del);
-   E_FREE_FUNC(comp->pointer, e_object_del);
+   E_FREE_FUNC(e_comp->fps_fg, e_view_destroy);
+   E_FREE_FUNC(e_comp->fps_bg, e_view_destroy);
+   E_FREE_FUNC(e_comp->autoclose.rect, evas_object_del);
+   E_FREE_FUNC(e_comp->pointer, e_object_del);
 }
 
 //////////////////////////////////////////////
@@ -217,7 +193,7 @@ EINTERN void
 e_comp_all_freeze(void)
 {
    if (_ev_freeze) return;
-   evas_event_freeze(e_comp_evas_get());
+   evas_event_freeze(e_comp->evas);
    _ev_freeze = EINA_TRUE;
 }
 
@@ -225,7 +201,7 @@ EINTERN void
 e_comp_all_thaw(void)
 {
    if (!_ev_freeze) return;
-   evas_event_thaw(e_comp_evas_get());
+   evas_event_thaw(e_comp->evas);
    _ev_freeze = EINA_FALSE;
 }
 
@@ -234,11 +210,8 @@ e_comp_zone_xy_get(Evas_Coord x, Evas_Coord y)
 {
    const Eina_List *l;
    E_Zone *zone;
-   Eina_List *zone_list = e_comp_zone_list_get();
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(zone_list, NULL);
 
-   EINA_LIST_FOREACH(zone_list, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      if (E_INSIDE(x, y, zone->x, zone->y, zone->w, zone->h)) return zone;
    return NULL;
 }
@@ -248,11 +221,8 @@ e_comp_zone_number_get(int num)
 {
    Eina_List *l = NULL;
    E_Zone *zone = NULL;
-   Eina_List *zone_list = e_comp_zone_list_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(zone_list, NULL);
-
-   EINA_LIST_FOREACH(zone_list, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
         if ((int)zone->num == num) return zone;
      }
@@ -264,11 +234,8 @@ e_comp_zone_id_get(int id)
 {
    Eina_List *l = NULL;
    E_Zone *zone = NULL;
-   Eina_List *zone_list = e_comp_zone_list_get();
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(zone_list, NULL);
 
-   EINA_LIST_FOREACH(zone_list, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
         if (zone->id == id) return zone;
      }
@@ -303,7 +270,7 @@ e_comp_canvas_zone_update(E_Zone *zone)
      }
    E_FREE_FUNC(zone->base, e_view_destroy);
    E_FREE_FUNC(zone->over, e_view_destroy);
-   layer_tree = e_canvas_layer_view_tree_get(e_comp_canvas_get(), E_CANVAS_LAYER_BG);
+   layer_tree = e_canvas_layer_view_tree_get(e_comp->canvas, E_CANVAS_LAYER_BG);
    view_edje = e_view_edje_create(layer_tree);
    zone->base = view = e_view_edje_view_get(view_edje);
    e_view_repeat_events_set(view, true);
@@ -313,7 +280,7 @@ e_comp_canvas_zone_update(E_Zone *zone)
    e_view_edje_size_set(view_edje, zone->w, zone->h);
    e_view_show(view);
 
-   layer_tree = e_canvas_layer_view_tree_get(e_comp_canvas_get(), E_CANVAS_LAYER_MAX);
+   layer_tree = e_canvas_layer_view_tree_get(e_comp->canvas, E_CANVAS_LAYER_MAX);
    view_edje = e_view_edje_create(layer_tree);
    zone->over = view = e_view_edje_view_get(view_edje);
    e_view_name_set(view, "zone->over");
@@ -333,16 +300,13 @@ e_comp_canvas_update(void)
    E_Tizen_Screen *tizen_screen;
    E_Screen *scr;
    Eina_Bool changed = EINA_FALSE;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
 
    screens = (Eina_List *)e_comp_screen_e_screens_get(e_comp_screen_get());
 
    if (screens)
      {
-        zones = comp->zones;
-        comp->zones = NULL;
+        zones = e_comp->zones;
+        e_comp->zones = NULL;
         printf("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
         EINA_LIST_FOREACH(screens, l, scr)
           {
@@ -365,7 +329,7 @@ e_comp_canvas_update(void)
                   if (changed)
                     printf("@@@ FOUND ZONE %i %i [%p]\n", zone->num, zone->id, zone);
                   zones = eina_list_remove(zones, zone);
-                  comp->zones = eina_list_append(comp->zones, zone);
+                  e_comp->zones = eina_list_append(e_comp->zones, zone);
                   zone->num = scr->screen;
                   free(zone->output_id);
                   zone->output_id = NULL;
@@ -384,7 +348,7 @@ e_comp_canvas_update(void)
                printf("@@@ SCREENS: %i %i | %i %i %ix%i\n",
                       scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h);
           }
-        comp->zones = eina_list_sort(comp->zones, 0, _e_comp_canvas_cb_zone_sort);
+        e_comp->zones = eina_list_sort(e_comp->zones, 0, _e_comp_canvas_cb_zone_sort);
      }
    else
      {
@@ -393,13 +357,13 @@ e_comp_canvas_update(void)
         z = e_comp_zone_number_get(0);
         if (z)
           {
-             changed |= e_zone_move_resize(z, 0, 0, comp->w, comp->h);
+             changed |= e_zone_move_resize(z, 0, 0, e_comp->w, e_comp->h);
           }
      }
 
    if (!changed) return;
 
-   EINA_LIST_FOREACH(comp->zones, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
         E_FREE_FUNC(zone->base, evas_object_del);
         E_FREE_FUNC(zone->over, evas_object_del);
@@ -541,14 +505,13 @@ EINTERN void
 e_comp_post_update_add(E_Client *ec)
 {
    E_Client *ec2;
-   E_Comp *comp;
 
-   if (!(comp = e_comp_get())) return;
+   if (!e_comp) return;
 
-   ec2 = eina_list_data_find(comp->post_updates, ec);
+   ec2 = eina_list_data_find(e_comp->post_updates, ec);
    if (ec2) return;
 
-   comp->post_updates = eina_list_append(comp->post_updates, ec);
+   e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
    e_object_ref(E_OBJECT(ec));
 }
 
@@ -557,15 +520,14 @@ e_comp_post_update_purge(E_Client *ec)
 {
    Eina_List *l, *ll;
    E_Client *ec2;
-   E_Comp *comp;
 
-   if (!(comp = e_comp_get())) return;
+   if (!e_comp) return;
 
-   EINA_LIST_FOREACH_SAFE(comp->post_updates, l, ll, ec2)
+   EINA_LIST_FOREACH_SAFE(e_comp->post_updates, l, ll, ec2)
      {
         if (ec2 == ec)
           {
-             comp->post_updates = eina_list_remove_list(comp->post_updates, l);
+             e_comp->post_updates = eina_list_remove_list(e_comp->post_updates, l);
              e_object_unref(E_OBJECT(ec));
           }
      }
@@ -587,15 +549,12 @@ EINTERN void
 e_comp_canvas_feed_mouse_up(unsigned int activate_time)
 {
    int button_mask, i;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
 
-   button_mask = evas_pointer_button_down_mask_get(comp->evas);
+   button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
    for (i = 0; i < 32; i++)
      {
        if ((button_mask & (1 << i)))
-         evas_event_feed_mouse_up(comp->evas, i + 1, EVAS_BUTTON_NONE, activate_time, NULL);
+         evas_event_feed_mouse_up(e_comp->evas, i + 1, EVAS_BUTTON_NONE, activate_time, NULL);
      }
 }
 
@@ -603,15 +562,12 @@ E_API void
 e_comp_canvas_norender_push(void)
 {
    E_Output *primary_output;
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN(comp);
 
    primary_output = e_display_primary_output_get();
 
-   TRACE_DS_BEGIN(Canvas NoRenderPush:%d, comp->norender + 1);
+   TRACE_DS_BEGIN(Canvas NoRenderPush:%d, e_comp->norender + 1);
    e_output_norender_push(primary_output);
-   comp->norender++;
+   e_comp->norender++;
    TRACE_DS_END();
 }
 
@@ -619,17 +575,14 @@ E_API void
 e_comp_canvas_norender_pop(void)
 {
    E_Output *primary_output;
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN(comp);
 
-   if (comp->norender <= 0) return;
+   if (e_comp->norender <= 0) return;
 
    primary_output = e_display_primary_output_get();
 
-   TRACE_DS_BEGIN(Canvas NoRenderPop:%d, comp->norender - 1);
+   TRACE_DS_BEGIN(Canvas NoRenderPop:%d, e_comp->norender - 1);
    e_output_norender_pop(primary_output);
-   comp->norender--;
+   e_comp->norender--;
    TRACE_DS_END();
 }
 
index 8dfcd200cdf80671a2c45bf922ce916e2ee017d7..0060e64b8f8d5bc50fd542235742f1095a46096c 100644 (file)
@@ -31,7 +31,7 @@ e_comp_canvas_x_root_unadjust(int x)
 {
    int cx;
 
-   ecore_evas_geometry_get(e_comp_ee_get(), &cx, NULL, NULL, NULL);
+   ecore_evas_geometry_get(e_comp->ee, &cx, NULL, NULL, NULL);
    return x + cx;
 }
 
@@ -40,7 +40,7 @@ e_comp_canvas_y_root_unadjust(int y)
 {
    int cy;
 
-   ecore_evas_geometry_get(e_comp_ee_get(), NULL, &cy, NULL, NULL);
+   ecore_evas_geometry_get(e_comp->ee, NULL, &cy, NULL, NULL);
    return y + cy;
 }
 
@@ -49,7 +49,7 @@ e_comp_canvas_x_root_adjust(int x)
 {
    int cx;
 
-   ecore_evas_geometry_get(e_comp_ee_get(), &cx, NULL, NULL, NULL);
+   ecore_evas_geometry_get(e_comp->ee, &cx, NULL, NULL, NULL);
    return x - cx;
 }
 
@@ -58,7 +58,7 @@ e_comp_canvas_y_root_adjust(int y)
 {
    int cy;
 
-   ecore_evas_geometry_get(e_comp_ee_get(), NULL, &cy, NULL, NULL);
+   ecore_evas_geometry_get(e_comp->ee, NULL, &cy, NULL, NULL);
    return y - cy;
 }
 
index 208d4ec9b9c07df608f3fde33cfb13d3963d84d5..45d9cdc67c17f99a0d324ec91f0d61ea880e8e2f 100644 (file)
@@ -5,7 +5,6 @@
 #include "e_comp_cfdata_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
 #include "e_comp_wl_tbm_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_comp_intern.h"
 #include "e_pixmap_intern.h"
 #include "e_map_intern.h"
@@ -338,13 +337,11 @@ _e_comp_object_cb_mirror_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
 static void
 _e_comp_object_cb_mirror_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
-   E_Comp_Object *cw;
-
-   if (!(cw = data)) return;
+   E_Comp_Object *cw = data;
 
    cw->force_visible++;
 
-   if (e_comp_hwc_is_configured() && !e_comp_is_on_overlay(cw->ec))
+   if (e_comp->hwc && !e_comp_is_on_overlay(cw->ec))
      e_comp_hwc_client_end(cw->ec, __FUNCTION__);
 }
 
@@ -1040,14 +1037,10 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
 static void
 _e_comp_object_animating_begin(E_Comp_Object *cw)
 {
-   E_Comp *comp = e_comp_get();
-
-   if (!comp) return;
-
    cw->animating++;
    if (cw->animating == 1)
      {
-        comp->animating++;
+        e_comp->animating++;
         REFD(cw->ec, 2);
         e_object_ref(E_OBJECT(cw->ec));
      }
@@ -1056,9 +1049,7 @@ _e_comp_object_animating_begin(E_Comp_Object *cw)
 static Eina_Bool
 _e_comp_object_animating_end(E_Comp_Object *cw)
 {
-   E_Comp *comp = e_comp_get();
-
-   if (comp && cw->animating)
+   if (cw->animating)
      {
         cw->animating--;
         if (!cw->animating)
@@ -1081,10 +1072,10 @@ _e_comp_object_animating_end(E_Comp_Object *cw)
                          }
                     }
                }
-             comp->animating--;
+             e_comp->animating--;
              cw->showing = cw->hiding = 0;
              UNREFD(cw->ec, 2);
-             if (comp->animating == 0)
+             if (e_comp->animating == 0)
                e_comp_visibility_calculation_set(EINA_TRUE);
              /* remove ref from animation start, account for possibility of deletion from unref */
              return !!e_object_unref(E_OBJECT(cw->ec));
@@ -1131,7 +1122,7 @@ _e_comp_object_effect_visibility_start(E_Comp_Object *cw, Eina_Bool state)
    if (!e_comp_object_effect_set(cw->smart_obj, cw->visibility_effect))
      return _e_comp_object_animating_end(cw);
 
-   evas_pointer_canvas_xy_get(e_comp_evas_get(), &x, &y);
+   evas_pointer_canvas_xy_get(e_comp->evas, &x, &y);
    x -= cw->x;
    y -= cw->y;
    zone = e_comp_zone_find_by_ec(cw->ec);
@@ -1281,19 +1272,19 @@ _e_comp_intercept_obj_color_set(void *data, Evas_Object *obj, int r, int g, int
 }
 
 static void
-_e_comp_object_setup(E_Comp_Object *cw, E_Comp *comp)
+_e_comp_object_setup(E_Comp_Object *cw)
 {
-   cw->clip = evas_object_rectangle_add(comp->evas);
+   cw->clip = evas_object_rectangle_add(e_comp->evas);
    evas_object_move(cw->clip, -9999, -9999);
    evas_object_resize(cw->clip, 999999, 999999);
    evas_object_smart_member_add(cw->clip, cw->smart_obj);
-   cw->effect_obj = edje_object_add(comp->evas);
+   cw->effect_obj = edje_object_add(e_comp->evas);
    evas_object_move(cw->effect_obj, cw->x, cw->y);
    evas_object_clip_set(cw->effect_obj, cw->clip);
    evas_object_smart_member_add(cw->effect_obj, cw->smart_obj);
    evas_object_intercept_color_set_callback_add(cw->effect_obj, _e_comp_intercept_effect_obj_color_set, cw);
    e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none");
-   cw->shobj = edje_object_add(comp->evas);
+   cw->shobj = edje_object_add(e_comp->evas);
    evas_object_data_set(cw->shobj, "comp_smart_obj", cw->smart_obj);
    edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj);
    edje_object_signal_callback_add(cw->shobj, "e,action,*,done", "e", _e_comp_object_done_defer, cw);
@@ -1319,7 +1310,7 @@ _e_comp_object_setup(E_Comp_Object *cw, E_Comp *comp)
         _e_comp_object_mouse_event_callback_set(cw);
      }
 
-   cw->default_input_obj = evas_object_rectangle_add(comp->evas);
+   cw->default_input_obj = evas_object_rectangle_add(e_comp->evas);
    evas_object_name_set(cw->default_input_obj, "cw->default_input_obj");
    evas_object_move(cw->default_input_obj, cw->x, cw->y);
    evas_object_resize(cw->default_input_obj, cw->w, cw->h);
@@ -1407,7 +1398,7 @@ _e_comp_object_pixels_noti(void *data, Evas_Object *obj EINA_UNUSED)
 
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (cw->external_content) return;
-   if (!e_comp_hwc_is_configured()) return;
+   if (!e_comp->hwc) return;
 
    e_comp_client_render_list_add(cw->ec);
 
@@ -1965,13 +1956,12 @@ _e_comp_intercept_hide(void *data, Evas_Object *obj)
 }
 
 static void
-_e_comp_intercept_show_helper(E_Comp_Object *cw, E_Comp *comp)
+_e_comp_intercept_show_helper(E_Comp_Object *cw)
 {
    E_Client *ec = cw->ec;
    int w = 0, h = 0;
 
-   EINA_SAFETY_ON_NULL_RETURN(comp);
-   EINA_SAFETY_ON_NULL_RETURN(ec);
+   EINA_SAFETY_ON_NULL_RETURN(cw->ec);
 
    if (ec->show_pending.count > 0)
      {
@@ -2010,8 +2000,8 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw, E_Comp *comp)
         evas_object_resize(cw->smart_obj, ec->w, ec->h);
         e_comp_object_frame_theme_set(cw->smart_obj, E_COMP_OBJECT_FRAME_RESHADOW);
 
-        if (comp->image_filter != E_COMP_IMAGE_FILTER_NONE)
-          e_comp_object_image_filter_set(cw->smart_obj, comp->image_filter);
+        if (e_comp->image_filter != E_COMP_IMAGE_FILTER_NONE)
+          e_comp_object_image_filter_set(cw->smart_obj, e_comp->image_filter);
 
         cw->real_hid = 0;
         ELOGF("COMP", "show_helper. evas_object_show!!!", ec);
@@ -2068,18 +2058,14 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw, E_Comp *comp)
         evas_object_show(cw->smart_obj);
         return;
      }
-   if (ec->netwm.type == E_WINDOW_TYPE_DND)
+   if (ec->netwm.type == E_WINDOW_TYPE_DND && !e_comp_wl->drag_client)
      {
-        E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-        if (!comp_wl || !comp_wl->drag_client)
-          {
-             /* start_drag not received */
-             ec->changes.visible = 1;
-             ec->visible = 1;
-             EC_CHANGED(ec);
-             ELOGF("COMP", "show_helper. return. start_drag not received yet", ec);
-             return;
-          }
+        /* start_drag not received */
+        ec->changes.visible = 1;
+        ec->visible = 1;
+        EC_CHANGED(ec);
+        ELOGF("COMP", "show_helper. return. start_drag not received yet", ec);
+        return;
      }
    /* re-set geometry */
    evas_object_move(cw->smart_obj, ec->x, ec->y);
@@ -2102,8 +2088,8 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw, E_Comp *comp)
         cw->real_hid = 0;
         /* force comp theming in case it didn't happen already */
         e_comp_object_frame_theme_set(cw->smart_obj, E_COMP_OBJECT_FRAME_RESHADOW);
-        if (comp->image_filter != E_COMP_IMAGE_FILTER_NONE)
-          e_comp_object_image_filter_set(cw->smart_obj, comp->image_filter);
+        if (e_comp->image_filter != E_COMP_IMAGE_FILTER_NONE)
+          e_comp_object_image_filter_set(cw->smart_obj, e_comp->image_filter);
      }
 
    /* only do the show if show is allowed */
@@ -2139,29 +2125,25 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw, E_Comp *comp)
 static void
 _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
 {
-   E_Comp_Object *cw;
-   E_Comp *comp;
-   E_Client *ec;
+   E_Comp_Object *cw = data;
+   E_Client *ec = cw->ec;
    Eina_List *l;
    E_Input_Rect_Data *input_rect_data;
    E_Input_Rect_Smart_Data *input_rect_sd;
    int tw, th;
 
-   if (!(comp = e_comp_get())) return;
-   if (!(cw = data)) return;
-   if (!(ec = cw->ec)) return;
    if (ec->ignored) return;
 
    if (cw->effect_obj)
      {
         //INF("SHOW2 %p", ec);
-        _e_comp_intercept_show_helper(cw, comp);
+        _e_comp_intercept_show_helper(cw);
         return;
      }
    //INF("SHOW %p", ec);
    if (ec->input_only)
      {
-        cw->effect_obj = evas_object_rectangle_add(comp->evas);
+        cw->effect_obj = evas_object_rectangle_add(e_comp->evas);
         evas_object_color_set(cw->effect_obj, 0, 0, 0, 0);
         evas_object_smart_member_add(cw->effect_obj, cw->smart_obj);
         evas_object_name_set(cw->effect_obj, "cw->effect_obj::input_only");
@@ -2174,11 +2156,11 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
              return;
           }
 
-        _e_comp_object_setup(cw, comp);
+        _e_comp_object_setup(cw);
         if (!cw->obj)
           {
              cw->content_type = E_COMP_OBJECT_CONTENT_TYPE_INT_IMAGE;
-             cw->obj = evas_object_image_filled_add(comp->evas);
+             cw->obj = evas_object_image_filled_add(e_comp->evas);
              evas_object_image_border_center_fill_set(cw->obj, EVAS_BORDER_FILL_SOLID);
              e_util_size_debug_set(cw->obj, 1);
              evas_object_image_pixels_get_callback_set(cw->obj, _e_comp_object_pixels_get, cw);
@@ -2218,7 +2200,7 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
    if (cw->mask.obj)
      evas_object_resize(cw->mask.obj, cw->w, cw->h);
 
-   _e_comp_intercept_show_helper(cw, comp);
+   _e_comp_intercept_show_helper(cw);
 }
 
 static void
@@ -2748,13 +2730,10 @@ _e_comp_object_input_thread_frame_set(void *data)
 static void
 _e_comp_smart_del(Evas_Object *obj)
 {
-   E_Comp *comp;
    Eina_List *l;
 
    INTERNAL_ENTRY;
 
-   if (!(comp = e_comp_get())) return;
-
    if (cw->buffer_destroy_listener.notify)
      {
         wl_list_remove(&cw->buffer_destroy_listener.link);
@@ -2809,7 +2788,7 @@ _e_comp_smart_del(Evas_Object *obj)
    if (cw->animating)
      {
         cw->animating = 0;
-        comp->animating--;
+        e_comp->animating--;
         UNREFD(cw->ec, 2);
         e_object_unref(E_OBJECT(cw->ec));
      }
@@ -3135,7 +3114,7 @@ e_comp_object_util_add(Evas_Object *obj)
 
    name = evas_object_name_get(obj);
    vis = evas_object_visible_get(obj);
-   o = edje_object_add(e_comp_evas_get());
+   o = edje_object_add(e_comp->evas);
    evas_object_data_set(o, "comp_object", (void*)1);
    if (name)
      skip = (!strncmp(name, "noshadow", 8));
@@ -3216,7 +3195,7 @@ e_comp_object_client_add(E_Client *ec)
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
    if (ec->frame) return NULL;
    _e_comp_smart_init();
-   o = evas_object_smart_add(e_comp_evas_get(), _e_comp_smart);
+   o = evas_object_smart_add(e_comp->evas, _e_comp_smart);
    cw = evas_object_smart_data_get(o);
    if (!cw) return NULL;
    evas_object_data_set(o, "E_Client", ec);
@@ -3379,17 +3358,14 @@ e_comp_object_util_center_on(Evas_Object *obj, Evas_Object *on)
 EINTERN void
 e_comp_object_util_fullscreen(Evas_Object *obj)
 {
-   E_Comp *comp;
    SOFT_ENTRY();
 
-   if (!(comp = e_comp_get())) return;
-
    if (cw)
      e_client_fullscreen(cw->ec, E_FULLSCREEN_RESIZE);
    else
      {
         evas_object_move(obj, 0, 0);
-        evas_object_resize(obj, comp->w, comp->h);
+        evas_object_resize(obj, e_comp->w, e_comp->h);
      }
 }
 
@@ -3458,7 +3434,7 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
    if (!cw->input_obj)
      {
         _e_comp_input_obj_smart_init();
-        cw->input_obj = evas_object_smart_add(e_comp_evas_get(), _e_comp_input_obj_smart);
+        cw->input_obj = evas_object_smart_add(e_comp->evas, _e_comp_input_obj_smart);
         evas_object_smart_member_add(cw->input_obj, cw->smart_obj);
         input_rect_sd = evas_object_smart_data_get(cw->input_obj);
 
@@ -3480,7 +3456,7 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
    if ((input_rect_data) &&
        (x || y || (w != cw->ec->client.w) || (h != cw->ec->client.h)))
      {
-        input_rect_data->obj = evas_object_rectangle_add(e_comp_evas_get());
+        input_rect_data->obj = evas_object_rectangle_add(e_comp->evas);
         evas_object_name_set(input_rect_data->obj, "cw->input_obj");
         evas_object_color_set(input_rect_data->obj, 0, 0, 0, 0);
         evas_object_clip_set(input_rect_data->obj, cw->clip);
@@ -3727,18 +3703,15 @@ e_comp_object_damage_exists(Evas_Object *obj)
 EINTERN void
 e_comp_object_render_update_add(Evas_Object *obj)
 {
-   E_Comp *comp;
    API_ENTRY;
 
-   if (!(comp = e_comp_get())) return;
-
    if (cw->ec->input_only || (!cw->updates) || (!cw->redirected)) return;
    if (cw->render_update_lock.lock) return;
    if (!e_pixmap_usable_get(cw->ec->pixmap)) return;
    if (!cw->update)
      {
         cw->update = 1;
-        comp->updates = eina_list_append(comp->updates, cw->ec);
+        e_comp->updates = eina_list_append(e_comp->updates, cw->ec);
      }
    e_comp_render_queue();
 }
@@ -3746,21 +3719,19 @@ e_comp_object_render_update_add(Evas_Object *obj)
 EINTERN void
 e_comp_object_render_update_del(Evas_Object *obj)
 {
-   E_Comp *comp;
    API_ENTRY;
 
-   if (!(comp = e_comp_get())) return;
    if (cw->ec->input_only || (!cw->updates)) return;
    if (!cw->update) return;
    cw->update = 0;
    /* this gets called during comp animating to clear the update flag */
-   if (comp->grabbed) return;
-   comp->updates = eina_list_remove(comp->updates, cw->ec);
-   if (!comp->updates)
+   if (e_comp->grabbed) return;
+   e_comp->updates = eina_list_remove(e_comp->updates, cw->ec);
+   if (!e_comp->updates)
      {
-        E_FREE_FUNC(comp->update_job, ecore_job_del);
-        if (comp->render_animator)
-          ecore_animator_freeze(comp->render_animator);
+        E_FREE_FUNC(e_comp->update_job, ecore_job_del);
+        if (e_comp->render_animator)
+          ecore_animator_freeze(e_comp->render_animator);
      }
 }
 
@@ -4118,7 +4089,7 @@ _e_comp_object_damage_trace_rect_set(Evas_Object *obj, Eina_Rectangle *origin, i
 
    evas_object_geometry_get(cw->obj, &obj_x, &obj_y, NULL, NULL);
 
-   o = evas_object_rectangle_add(e_comp_evas_get());
+   o = evas_object_rectangle_add(e_comp->evas);
    evas_object_layer_set(o, E_LAYER_MAX);
    evas_object_name_set(o, "damage_trace");
    evas_object_move(o, dmg_x + obj_x, dmg_y + obj_y);
@@ -4659,26 +4630,23 @@ e_comp_object_effect_hiding_set(Evas_Object *obj, Eina_Bool set)
 static void
 _e_comp_object_autoclose_cleanup(Eina_Bool already_del)
 {
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
-   if (comp->autoclose.obj)
+   if (e_comp->autoclose.obj)
      {
         e_comp_ungrab_input(0, 1);
-        if (comp->autoclose.del_cb)
-          comp->autoclose.del_cb(comp->autoclose.data, comp->autoclose.obj);
+        if (e_comp->autoclose.del_cb)
+          e_comp->autoclose.del_cb(e_comp->autoclose.data, e_comp->autoclose.obj);
         else if (!already_del)
           {
-             evas_object_hide(comp->autoclose.obj);
-             E_FREE_FUNC(comp->autoclose.obj, evas_object_del);
+             evas_object_hide(e_comp->autoclose.obj);
+             E_FREE_FUNC(e_comp->autoclose.obj, evas_object_del);
           }
-        E_FREE_FUNC(comp->autoclose.rect, evas_object_del);
+        E_FREE_FUNC(e_comp->autoclose.rect, evas_object_del);
      }
-   comp->autoclose.obj = NULL;
-   comp->autoclose.data = NULL;
-   comp->autoclose.del_cb = NULL;
-   comp->autoclose.key_cb = NULL;
-   E_FREE_FUNC(comp->autoclose.key_handler, ecore_event_handler_del);
+   e_comp->autoclose.obj = NULL;
+   e_comp->autoclose.data = NULL;
+   e_comp->autoclose.del_cb = NULL;
+   e_comp->autoclose.key_cb = NULL;
+   E_FREE_FUNC(e_comp->autoclose.key_handler, ecore_event_handler_del);
 }
 
 static void
@@ -4690,22 +4658,19 @@ _e_comp_object_autoclose_mouse_up_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED
 static void
 _e_comp_object_autoclose_setup(Evas_Object *obj)
 {
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
-   if (!comp->autoclose.rect)
+   if (!e_comp->autoclose.rect)
      {
         /* create rect just below autoclose object to catch mouse events */
-        comp->autoclose.rect = evas_object_rectangle_add(comp->evas);
-        evas_object_move(comp->autoclose.rect, 0, 0);
-        evas_object_resize(comp->autoclose.rect, comp->w, comp->h);
-        evas_object_show(comp->autoclose.rect);
-        evas_object_name_set(comp->autoclose.rect, "e_comp->autoclose.rect");
-        evas_object_color_set(comp->autoclose.rect, 0, 0, 0, 0);
-        evas_object_event_callback_add(comp->autoclose.rect, EVAS_CALLBACK_MOUSE_UP, _e_comp_object_autoclose_mouse_up_cb, comp);
+        e_comp->autoclose.rect = evas_object_rectangle_add(e_comp->evas);
+        evas_object_move(e_comp->autoclose.rect, 0, 0);
+        evas_object_resize(e_comp->autoclose.rect, e_comp->w, e_comp->h);
+        evas_object_show(e_comp->autoclose.rect);
+        evas_object_name_set(e_comp->autoclose.rect, "e_comp->autoclose.rect");
+        evas_object_color_set(e_comp->autoclose.rect, 0, 0, 0, 0);
+        evas_object_event_callback_add(e_comp->autoclose.rect, EVAS_CALLBACK_MOUSE_UP, _e_comp_object_autoclose_mouse_up_cb, e_comp);
         e_comp_grab_input(0, 1);
      }
-   evas_object_layer_set(comp->autoclose.rect, evas_object_layer_get(obj) - 1);
+   evas_object_layer_set(e_comp->autoclose.rect, evas_object_layer_get(obj) - 1);
    evas_object_focus_set(obj, 1);
 }
 
@@ -4732,34 +4697,32 @@ _e_comp_object_autoclose_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_O
 EINTERN void
 e_comp_object_util_autoclose(Evas_Object *obj, E_Comp_Object_Autoclose_Cb del_cb, E_Comp_Object_Key_Cb cb, const void *data)
 {
-   E_Comp *comp;
    SOFT_ENTRY();
 
-   if (!(comp = e_comp_get())) return;
-   if (comp->autoclose.obj)
+   if (e_comp->autoclose.obj)
      {
-        if (comp->autoclose.obj == obj) return;
-        evas_object_event_callback_del_full(comp->autoclose.obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, comp);
-        comp->autoclose.obj = obj;
-        comp->autoclose.del_cb = del_cb;
-        comp->autoclose.key_cb = cb;
-        comp->autoclose.data = (void*)data;
+        if (e_comp->autoclose.obj == obj) return;
+        evas_object_event_callback_del_full(e_comp->autoclose.obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, e_comp);
+        e_comp->autoclose.obj = obj;
+        e_comp->autoclose.del_cb = del_cb;
+        e_comp->autoclose.key_cb = cb;
+        e_comp->autoclose.data = (void*)data;
         if (evas_object_visible_get(obj))
           _e_comp_object_autoclose_setup(obj);
         else
-          evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _e_comp_object_autoclose_show, comp);
-        evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, comp);
+          evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _e_comp_object_autoclose_show, e_comp);
+        evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, e_comp);
         return;
      }
-   comp->autoclose.obj = obj;
-   comp->autoclose.del_cb = del_cb;
-   comp->autoclose.key_cb = cb;
-   comp->autoclose.data = (void*)data;
+   e_comp->autoclose.obj = obj;
+   e_comp->autoclose.del_cb = del_cb;
+   e_comp->autoclose.key_cb = cb;
+   e_comp->autoclose.data = (void*)data;
    if (evas_object_visible_get(obj))
      _e_comp_object_autoclose_setup(obj);
    else
-     evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _e_comp_object_autoclose_show, comp);
-   evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, comp);
+     evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _e_comp_object_autoclose_show, e_comp);
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _e_comp_object_autoclose_del, e_comp);
 }
 
 E_API unsigned int
@@ -4820,7 +4783,7 @@ e_comp_object_mask_set(Evas_Object *obj, Eina_Bool set)
      {
         if (!cw->mask.obj)
           {
-             o = evas_object_rectangle_add(e_comp_evas_get());
+             o = evas_object_rectangle_add(e_comp->evas);
              evas_object_color_set(o, 0, 0, 0, 0);
              evas_object_clip_set(o, cw->clip);
              evas_object_smart_member_add(o, obj);
@@ -4896,7 +4859,7 @@ e_comp_object_transform_bg_set(Evas_Object *obj, Eina_Bool set)
      {
         if (!cw->transform_bg_obj)
           {
-             Evas_Object *o = evas_object_rectangle_add(e_comp_evas_get());
+             Evas_Object *o = evas_object_rectangle_add(e_comp->evas);
              evas_object_move(o, 0, 0);
              evas_object_resize(o, 1, 1);
              if (cw->transform_bg_color.a >= 255)
@@ -4981,7 +4944,7 @@ e_comp_object_transform_transp_set(Evas_Object *obj, Eina_Bool set)
      {
         if (!cw->transform_tranp_obj)
           {
-             Evas_Object *o = evas_object_rectangle_add(e_comp_evas_get());
+             Evas_Object *o = evas_object_rectangle_add(e_comp->evas);
              evas_object_move(o, 0, 0);
              evas_object_resize(o, 1, 1);
              evas_object_render_op_set(o, EVAS_RENDER_COPY);
@@ -5083,15 +5046,11 @@ e_comp_object_content_set(Evas_Object *obj,
 EINTERN Eina_Bool
 e_comp_object_content_unset(Evas_Object *obj)
 {
-   E_Comp *comp;
    API_ENTRY EINA_FALSE;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec->pixmap, EINA_FALSE);
 
-   comp = e_comp_get();
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
-
    if (!cw->obj && !cw->ec->visible)
      {
         ELOGF("COMP", "is not visible yet. no need to unset", cw->ec);
@@ -5128,7 +5087,7 @@ e_comp_object_content_unset(Evas_Object *obj)
 
 
    cw->content_type = E_COMP_OBJECT_CONTENT_TYPE_INT_IMAGE;
-   cw->obj = evas_object_image_filled_add(comp->evas);
+   cw->obj = evas_object_image_filled_add(e_comp->evas);
    evas_object_image_border_center_fill_set(cw->obj, EVAS_BORDER_FILL_SOLID);
    e_util_size_debug_set(cw->obj, 1);
    evas_object_image_pixels_get_callback_set(cw->obj, _e_comp_object_pixels_get, cw);
@@ -5146,7 +5105,7 @@ e_comp_object_content_unset(Evas_Object *obj)
    if (cw->visible)
      {
         cw->visible = 0;
-        _e_comp_intercept_show_helper(cw, comp);
+        _e_comp_intercept_show_helper(cw);
         cw->visible = 1;
      }
 
@@ -5226,7 +5185,7 @@ e_comp_object_dim_mask_set(Evas_Object *obj, Eina_Bool set)
           }
 
         ELOGF("COMP", "DIM  |Mask applied on Dim rect mask_rect[%d %d %d %d]", cw->ec, cw->dim.mask_x, cw->dim.mask_y, cw->dim.mask_w, cw->dim.mask_h);
-        o = evas_object_rectangle_add(e_comp_evas_get());
+        o = evas_object_rectangle_add(e_comp->evas);
         evas_object_color_set(o, 0, 0, 0, 0);
         evas_object_smart_member_add(o, obj);
         evas_object_resize(o, cw->dim.mask_w, cw->dim.mask_h);
@@ -5626,19 +5585,16 @@ _e_comp_object_damage_trace_render_post_cb(void *data, Evas *e EINA_UNUSED, void
 EINTERN void
 e_comp_object_damage_trace_debug(Eina_Bool onoff)
 {
-   Evas *evas = e_comp_evas_get();
-
-   if (!evas) return;
    if (_damage_trace == onoff) return;
 
    if (onoff)
      {
-        evas_event_callback_add(evas,
+        evas_event_callback_add(e_comp->evas,
                                 EVAS_CALLBACK_RENDER_PRE,
                                 _e_comp_object_damage_trace_render_pre_cb,
                                 NULL);
 
-        evas_event_callback_add(evas,
+        evas_event_callback_add(e_comp->evas,
                                 EVAS_CALLBACK_RENDER_POST,
                                 _e_comp_object_damage_trace_render_post_cb,
                                 NULL);
@@ -5657,11 +5613,11 @@ e_comp_object_damage_trace_debug(Eina_Bool onoff)
 
         _damage_trace_post_objs = NULL;
 
-        evas_event_callback_del(evas,
+        evas_event_callback_del(e_comp->evas,
                                 EVAS_CALLBACK_RENDER_PRE,
                                 _e_comp_object_damage_trace_render_pre_cb);
 
-        evas_event_callback_del(evas,
+        evas_event_callback_del(e_comp->evas,
                                 EVAS_CALLBACK_RENDER_POST,
                                 _e_comp_object_damage_trace_render_post_cb);
      }
index 53baa6b29bdd271ccb63d34f3cef486e9c81fdf1..5736718c880ba579c6f0e455440d0dfad699fcb5 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_egl_sync_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_comp_intern.h"
 
 #include <EGL/egl.h>
@@ -193,13 +192,11 @@ e_egl_sync_init(void)
 {
    E_Egl_Sync_Mgr *egl_sync_mgr = NULL;
    const char *extensions = NULL;
-   E_Comp *comp = e_comp_get();
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->wl.disp, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp->e_comp_screen, 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);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
 
    if (_egl_sync_mgr) return EINA_TRUE;
    if (!e_comp_gl_get()) return EINA_TRUE;
index a9080177266aed749175f842cf7292c27a7f2092..0f0b5e2946e8ecb7fd7e334881130a6d6f0c8207 100644 (file)
@@ -1077,11 +1077,7 @@ _e_input_thread_client_free(void *data)
 static void
 _e_client_free(E_Client *ec)
 {
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
-
-   e_comp_ec_list_lock();
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    E_Input_Thread_Request_EClient_Data ec_data;
    memset(&ec_data, 0, sizeof(E_Input_Thread_Request_EClient_Data));
@@ -1092,7 +1088,7 @@ _e_client_free(E_Client *ec)
    E_OBJECT(ec)->references++;
 
    if (ec->new_client)
-     comp->new_clients--;
+     e_comp->new_clients--;
 
    E_FREE_FUNC(ec->kill_timer, ecore_timer_del);
 
@@ -1134,7 +1130,7 @@ _e_client_free(E_Client *ec)
    _e_client_private_finish(ec);
    free(ec);
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 static void
@@ -1151,15 +1147,12 @@ _e_input_thread_client_del(void *data)
 static void
 _e_client_del(E_Client *ec)
 {
-   E_Comp *comp;
    E_Client *child;
    E_Pixmap_Type type;
    E_Input_Thread_Request_EClient_Data ec_data;
    memset(&ec_data, 0, sizeof(E_Input_Thread_Request_EClient_Data));
 
-   if (!(comp = e_comp_get())) return;
-
-   e_comp_ec_list_lock();
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    ec->changed = 0;
 
@@ -1206,7 +1199,7 @@ _e_client_del(E_Client *ec)
    type = e_pixmap_type_get(ec->pixmap);
    if (type < E_PIXMAP_TYPE_MAX)
      eina_hash_del_by_key(clients_hash[type], &ec->pixmap);
-   comp->clients = eina_list_remove(comp->clients, ec);
+   e_comp->clients = eina_list_remove(e_comp->clients, ec);
    e_comp_object_render_update_del(ec->frame);
    e_comp_post_update_purge(ec);
    if (e_pixmap_free(ec->pixmap))
@@ -1242,7 +1235,7 @@ _e_client_del(E_Client *ec)
         e_input_backend_thread_safe_call(_e_input_thread_client_del, &ec_data, sizeof(E_Input_Thread_Request_EClient_Data));
      }
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 ///////////////////////////////////////////
@@ -1361,7 +1354,7 @@ _e_client_move_begin(E_Client *ec)
           e_client_raise(ec);
      }
 
-   if (e_comp_hwc_is_configured())
+   if (e_comp->hwc)
      e_comp_client_override_add(ec);
 
    return 1;
@@ -1379,7 +1372,7 @@ _e_client_move_end(E_Client *ec)
    if (ec->transformed)
      _e_client_transform_move_end(ec);
 
-   if (e_comp_hwc_is_configured())
+   if (e_comp->hwc)
      e_comp_client_override_del(ec);
 
    ecmove = NULL;
@@ -1752,7 +1745,7 @@ e_client_resize_end(E_Client *ec)
    if (ec->transformed)
      _e_client_transform_resize_end(ec);
 
-   if (e_comp_hwc_is_configured())
+   if (e_comp->hwc)
      e_comp_client_override_del(ec);
 
    ecresize = NULL;
@@ -1847,13 +1840,12 @@ _e_client_position_inside_input_rect(E_Client *ec, int tx, int ty)
 static Eina_Bool
 _e_client_under_pointer_helper_ignore_client(E_Desk *desk, E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    /* If a border was specified which should be excluded from the list
     * (because it will be closed shortly for example), skip */
    if (e_client_util_ignored_get(ec) || (!e_desk_has_ec(desk, ec))) return EINA_TRUE;
    if (!e_view_client_visible_get(PRI(ec)->view_client)) return EINA_TRUE;
    if (e_policy_client_is_cursor(ec)) return EINA_TRUE;
-   if (comp_wl && comp_wl->drag_client == ec) return EINA_TRUE;
+   if (e_comp_wl->drag_client == ec) return EINA_TRUE;
 
    return EINA_FALSE;
 }
@@ -2221,7 +2213,6 @@ _e_client_aux_hint_eval(E_Client *ec)
 static void
 _e_client_eval(E_Client *ec)
 {
-   E_Comp *comp;
    int send_event = 1;
    unsigned int prop = 0;
    int tx, ty;
@@ -2330,10 +2321,9 @@ _e_client_eval(E_Client *ec)
      {
         ec->changes.icon = 0;
      }
-   
-   comp = e_comp_get();
-   if (ec->new_client && comp)
-     comp->new_clients--;
+
+   if (ec->new_client)
+     e_comp->new_clients--;
    ec->new_client = 0;
    ec->changed = ec->changes.pos || ec->changes.size ||
                  ec->changes.stack || ec->changes.prop || ec->changes.border ||
@@ -2608,13 +2598,11 @@ EINTERN Eina_Bool
 e_client_visibility_touched_check(E_Client *ec)
 {
    int tx, ty;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
 
-   tx = wl_fixed_to_int(comp_wl->ptr.x);
-   ty = wl_fixed_to_int(comp_wl->ptr.y);
+   tx = wl_fixed_to_int(e_comp->wl_comp_data->ptr.x);
+   ty = wl_fixed_to_int(e_comp->wl_comp_data->ptr.y);
 
    return _e_client_position_inside_input_rect(ec, tx, ty);
 }
@@ -3113,17 +3101,15 @@ EINTERN void
 e_client_idler_before(Eina_Bool *check_focus)
 {
    const Eina_List *l;
-   Eina_List *ec_list;
    E_Client *ec;
 
    *check_focus = EINA_FALSE;
 
-   if (!(ec_list = e_comp_ec_list_get())) return;
    if (!e_client_clients_hash_exist()) return;
 
    TRACE_DS_BEGIN(CLIENT:IDLE BEFORE);
 
-   EINA_LIST_FOREACH(ec_list, l, ec)
+   EINA_LIST_FOREACH(e_comp->clients, l, ec)
      {
         // pass 1 - eval0. fetch properties on new or on change and
         // call hooks to decide what to do - maybe move/resize
@@ -3348,7 +3334,7 @@ _e_client_view_init(E_Client *ec)
    E_Client_Private *priv = PRI(ec);
    E_View_Tree *tree;
 
-   tree = e_canvas_layer_view_tree_get(e_comp_canvas_get(), E_CANVAS_LAYER_CLIENT_NORMAL);
+   tree = e_canvas_layer_view_tree_get(e_comp->canvas, E_CANVAS_LAYER_CLIENT_NORMAL);
    if (!tree)
      return;
 
@@ -3360,9 +3346,6 @@ e_client_new(E_Pixmap *cp, int first_map, int internal)
 {
    E_Client *ec;
    E_Pixmap_Type type;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return NULL;
 
    type = e_pixmap_type_get(cp);
    if (type >= E_PIXMAP_TYPE_MAX) return NULL;
@@ -3405,7 +3388,7 @@ e_client_new(E_Pixmap *cp, int first_map, int internal)
         ec->re_manage = 1;
      }
    ec->new_client = 1;
-   comp->new_clients++;
+   e_comp->new_clients++;
 
    ec->exp_iconify.by_client = 0;
    ec->exp_iconify.not_raise = 0;
@@ -3468,7 +3451,7 @@ e_client_new(E_Pixmap *cp, int first_map, int internal)
 
    EC_CHANGED(ec);
 
-   comp->clients = eina_list_append(comp->clients, ec);
+   e_comp->clients = eina_list_append(e_comp->clients, ec);
    eina_hash_add(clients_hash[type], &ec->pixmap, ec);
 
    ELOGF("COMP", "CLIENT ADD. cp:%p, argb:%d, internal:%d, ignored:%d", ec, cp, ec->argb, internal, ec->ignored);
@@ -4012,7 +3995,7 @@ e_client_top_get(void)
 EINTERN unsigned int
 e_clients_count(void)
 {
-   return eina_list_count(e_comp_ec_list_get());
+   return eina_list_count(e_comp->clients);
 }
 
 /**
@@ -4199,13 +4182,10 @@ e_client_lost_windows_get(E_Zone *zone)
    const Eina_List *l;
    E_Client *ec;
    int loss_overlap = 5;
-   Eina_List *ec_list;
-
-   if (!(ec_list = e_comp_ec_list_get())) return NULL;
 
    E_OBJECT_CHECK_RETURN(zone, NULL);
    E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL);
-   EINA_LIST_FOREACH(ec_list, l, ec)
+   EINA_LIST_FOREACH(e_comp->clients, l, ec)
      {
         if (!e_zone_has_ec(zone, ec)) continue;
         if (e_client_util_ignored_get(ec)) continue;
@@ -4964,7 +4944,7 @@ e_client_resize_begin(E_Client *ec)
           e_client_raise(ec);
      }
 
-   if (e_comp_hwc_is_configured())
+   if (e_comp->hwc)
      e_comp_client_override_add(ec);
 
    return EINA_TRUE;
@@ -7453,11 +7433,8 @@ e_client_shell_unmap(E_Client *ec)
 EINTERN void
 e_client_show(E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
-
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    if (ec->comp_data->mapped)
      return;
@@ -7469,10 +7446,10 @@ e_client_show(E_Client *ec)
         _e_client_shell_map(ec);
      }
    else if (ec->internal || e_comp_wl_subsurface_can_show(ec) ||
-            (ec == comp_wl->drag_client))
+            (ec == e_comp_wl->drag_client))
      {
         ELOGF("E_CLIENT", "Map. internal:%d, drag:%d",
-              ec, ec->internal, (ec == comp_wl->drag_client));
+              ec, ec->internal, (ec == e_comp_wl->drag_client));
         ec->visible = EINA_TRUE;
         ec->ignored = 0;
         e_view_client_show(PRI(ec)->view_client);
@@ -7484,11 +7461,11 @@ EINTERN void
 e_client_hide(E_Client *ec)
 {
    API_ENTRY;
-   E_Comp_Wl_Data *comp_wl;
 
    EINA_SAFETY_ON_NULL_RETURN(ec->comp_data);
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!ec->comp_data->mapped) return;
+
+   if (!ec->comp_data->mapped)
+     return;
 
    if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap))
      {
@@ -7513,10 +7490,10 @@ e_client_hide(E_Client *ec)
         e_client_shell_unmap(ec);
      }
    else if ((ec->internal) || (e_comp_wl_subsurface_check(ec)) ||
-            (ec == comp_wl->drag_client))
+            (ec == e_comp_wl->drag_client))
      {
         ELOGF("E_CLIENT", "Unmap. internal:%d, sub:%p, drag:%d",
-              ec, ec->internal, ec->comp_data->sub.data, (ec == comp_wl->drag_client));
+              ec, ec->internal, ec->comp_data->sub.data, (ec == e_comp_wl->drag_client));
         ec->visible = EINA_FALSE;
         e_view_client_hide(PRI(ec)->view_client);
         ec->comp_data->mapped = 0;
index 9e20e3e3141f5af263003964307f4bf23b76c0ab..d43923ab3d6edd76cf94f9efe2ae505acbb115c8 100644 (file)
@@ -344,16 +344,13 @@ EINTERN void
 e_desk_name_update(void)
 {
    const Eina_List *z, *l;
-   Eina_List *comp_zone_list;
    E_Zone *zone;
    E_Desk *desk;
    E_Config_Desktop_Name *cfname;
    int d_x, d_y, ok;
    char name[40];
 
-   if (!(comp_zone_list = e_comp_zone_list_get())) return;
-
-   EINA_LIST_FOREACH(comp_zone_list, z, zone)
+   EINA_LIST_FOREACH(e_comp->zones, z, zone)
      {
         for (d_x = 0; d_x < zone->desk_x_count; d_x++)
           {
@@ -649,13 +646,11 @@ e_desk_prev(E_Zone *zone)
 EINTERN unsigned int
 e_desks_count(void)
 {
-   Eina_List *l, *comp_zone_list;
+   Eina_List *l;
    E_Zone *zone;
    unsigned int count = 0;
 
-   if (!(comp_zone_list = e_comp_zone_list_get())) return 0;
-
-   EINA_LIST_FOREACH(comp_zone_list, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
         int cx = 0, cy = 0;
 
@@ -1653,7 +1648,7 @@ _e_desk_smart_init(E_Desk *desk)
 
    zone = desk->zone;
 
-   desk->smart_obj = evas_object_smart_add(e_comp_evas_get(), _e_desk_smart_class_new());
+   desk->smart_obj = evas_object_smart_add(e_comp->evas, _e_desk_smart_class_new());
    e_desk_geometry_set(desk, zone->x, zone->y, zone->w, zone->h);
 
    E_DESK_SMART_DATA_GET_OR_RETURN(desk->smart_obj, sd);
index ec79fcca5edc9f1515d41d8f4b857ec9b55f5b3b..a9159cd917ce88207431db39d843d8454252ead2 100644 (file)
@@ -158,9 +158,6 @@ static void
 _e_desk_area_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
 {
    int w, h;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    if (send_size)
      {
@@ -175,7 +172,7 @@ _e_desk_area_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
         w = h = -1;
      }
 
-   e_client_shell_configure_send(ec, edges * comp_wl->resize.edges, w, h);
+   e_client_shell_configure_send(ec, edges * e_comp_wl->resize.edges, w, h);
 }
 
 static void
@@ -209,7 +206,7 @@ _e_comp_object_layers_update(unsigned int layer, E_Comp_Input_Inlist_Function_Ty
 static void
 _e_comp_object_layers_add(E_Desk_Area *eda, E_Comp_Object *cw, E_Comp_Object *above, E_Comp_Object *below, Eina_Bool prepend)
 {
-   e_comp_ec_list_lock();
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    if (above)
      {
@@ -237,14 +234,14 @@ _e_comp_object_layers_add(E_Desk_Area *eda, E_Comp_Object *cw, E_Comp_Object *ab
           }
         eda->layers[cw->layer].clients_count++;
      }
-   
-   e_comp_ec_list_unlock();
+
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 static void
 _e_comp_object_layers_remove(E_Desk_Area *eda, E_Comp_Object *cw)
 {
-   e_comp_ec_list_lock();
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    if (cw->ec && eda->layers[cw->layer].clients)
      {
@@ -253,7 +250,7 @@ _e_comp_object_layers_remove(E_Desk_Area *eda, E_Comp_Object *cw)
         _e_comp_object_layers_update(cw->layer, E_COMP_INPUT_INLIST_REMOVE, cw->ec, NULL);
      }
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 static Eina_Bool
@@ -702,7 +699,7 @@ _e_desk_area_smart_client_del(Evas_Object *obj, E_Client *ec)
 static void
 _e_desk_area_smart_init(E_Desk_Area *eda)
 {
-   eda->smart_obj = evas_object_smart_add(e_comp_evas_get(), _e_desk_area_smart_class_new());
+   eda->smart_obj = evas_object_smart_add(e_comp->evas, _e_desk_area_smart_class_new());
 
    E_DESK_AREA_SMART_DATA_GET_OR_RETURN(eda->smart_obj, sd);
 
@@ -838,7 +835,7 @@ _desk_area_cb_client_get_above(struct wl_listener *listener, void *data)
    if (ec->layer == E_LAYER_CLIENT_CURSOR) return;
    if (e_util_client_layer_map(ec->layer) == 9999) return;
 
-   e_comp_ec_list_lock();;
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    /* go up the layers until we find one */
    for (x = e_comp_canvas_layer_map(ec->layer) + 1; x <= e_comp_canvas_layer_map(E_LAYER_CLIENT_CURSOR); x++)
@@ -856,13 +853,13 @@ _desk_area_cb_client_get_above(struct wl_listener *listener, void *data)
              if (!e_object_is_del(E_OBJECT(ec2)))
                {
                   get_above_data->above_ec = ec2;
-                  e_comp_ec_list_unlock();
+                  g_rec_mutex_unlock(&e_comp->ec_list_mutex);
                   return;
                }
           }
      }
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 static void
@@ -923,7 +920,7 @@ _desk_area_cb_client_get_below(struct wl_listener *listener, void *data)
    x = e_comp_canvas_layer_map(ec_layer);
    if (x > 0) x--;
 
-   e_comp_ec_list_lock();;
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    for (; x >= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x--)
      {
@@ -940,13 +937,13 @@ _desk_area_cb_client_get_below(struct wl_listener *listener, void *data)
              if (!e_object_is_del(E_OBJECT(ec2)))
                {
                   get_below_data->below_ec = ec2;
-                  e_comp_ec_list_unlock();
+                  g_rec_mutex_unlock(&e_comp->ec_list_mutex);
                   return;
                }
           }
      }
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 static void
@@ -981,7 +978,7 @@ _desk_area_cb_client_get_visible_above(struct wl_listener *listener, void *data)
    if (ec->layer == E_LAYER_CLIENT_CURSOR) return;
    if (e_util_client_layer_map(ec->layer) == 9999) return;
 
-   e_comp_ec_list_lock();;
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    /* go up the layers until we find one */
    for (x = e_comp_canvas_layer_map(ec->layer) + 1; x <= e_comp_canvas_layer_map(E_LAYER_CLIENT_CURSOR); x++)
@@ -996,13 +993,13 @@ _desk_area_cb_client_get_visible_above(struct wl_listener *listener, void *data)
                  (ec2->frame))
                {
                   get_visible_above_data->above_ec = ec2;
-                  e_comp_ec_list_unlock();
+                  g_rec_mutex_unlock(&e_comp->ec_list_mutex);
                   return;
                }
           }
      }
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 }
 
 static void
@@ -1892,7 +1889,7 @@ _e_client_zones_layout_calc(E_Client *ec, int *zx, int *zy, int *zw, int *zh)
    w = zone->w;
    h = zone->h;
 
-   if (eina_list_count(e_comp_zone_list_get()) == 1)
+   if (eina_list_count(e_comp->zones) == 1)
      {
         if (zx) *zx = x;
         if (zy) *zy = y;
@@ -2433,9 +2430,6 @@ _desk_area_cb_comp_object_resize(struct wl_listener *listener, void *data)
 {
    E_Desk_Area_Private_Client *eda_client;
    E_Client *ec;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    eda_client = wl_container_of(listener, eda_client, comp_object_resize);
    ec = eda_client->ec;
@@ -2445,7 +2439,7 @@ _desk_area_cb_comp_object_resize(struct wl_listener *listener, void *data)
    if (!ec->comp_data->shell.configure_send) return;
 
    /* TODO: calculate x, y with transfrom object */
-   if ((e_client_util_resizing_get(ec)) && (!ec->transformed) && (comp_wl->resize.edges))
+   if ((e_client_util_resizing_get(ec)) && (!ec->transformed) && (e_comp_wl->resize.edges))
      {
         int w, h;
 
@@ -2490,7 +2484,7 @@ _desk_area_cb_comp_object_resize(struct wl_listener *listener, void *data)
         h = E_CLAMP(h, 1, h);
         e_client_resize_limit(ec, &w, &h);
 
-        e_client_shell_configure_send(ec, comp_wl->resize.edges, w, h);
+        e_client_shell_configure_send(ec, e_comp_wl->resize.edges, w, h);
      }
    else if ((!ec->fullscreen) && (!ec->maximized) &&
             (!e_client_maximize_pre_get(ec)))
@@ -2555,7 +2549,7 @@ e_desk_area_new(E_Desk *desk, int id, int x, int y, int w, int h, E_Desk_Area_La
    for (ec_layer = e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); ec_layer <= e_comp_canvas_layer_map(E_LAYER_CLIENT_CURSOR); ec_layer++)
      {
 
-        obj = eda->layers[ec_layer].obj = evas_object_rectangle_add(e_comp_evas_get());
+        obj = eda->layers[ec_layer].obj = evas_object_rectangle_add(e_comp->evas);
         evas_object_layer_set(obj, e_comp_canvas_layer_map_to(ec_layer));
         evas_object_name_set(obj, "layer_obj");
      }
@@ -2932,7 +2926,7 @@ e_desk_area_top_ec_get(E_Desk_Area *eda)
    E_Client *ec;
    unsigned int x;
 
-   e_comp_ec_list_lock();;
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    for (x = e_comp_canvas_layer_map(E_LAYER_CLIENT_CURSOR); x >= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x--)
      {
@@ -2941,12 +2935,12 @@ e_desk_area_top_ec_get(E_Desk_Area *eda)
         EINA_INLIST_REVERSE_FOREACH(eda->layers[x].clients, ec)
           if (!e_object_is_del(E_OBJECT(ec)))
             {
-               e_comp_ec_list_unlock();
+               g_rec_mutex_unlock(&e_comp->ec_list_mutex);
                return ec;
             }
      }
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 
    return NULL;
 }
@@ -2957,7 +2951,7 @@ e_desk_area_bottom_ec_get(E_Desk_Area *eda)
    E_Client *ec;
    unsigned int x;
 
-   e_comp_ec_list_lock();;
+   g_rec_mutex_lock(&e_comp->ec_list_mutex);
 
    for (x = e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x <= e_comp_canvas_layer_map(E_LAYER_CLIENT_CURSOR); x++)
      {
@@ -2966,12 +2960,12 @@ e_desk_area_bottom_ec_get(E_Desk_Area *eda)
         EINA_INLIST_FOREACH(eda->layers[x].clients, ec)
           if (!e_object_is_del(E_OBJECT(ec)))
             {
-               e_comp_ec_list_unlock();
+               g_rec_mutex_unlock(&e_comp->ec_list_mutex);
                return ec;
             }
      }
 
-   e_comp_ec_list_unlock();
+   g_rec_mutex_unlock(&e_comp->ec_list_mutex);
 
    return NULL;
 }
index 2298a299cca56475b987bc2935a341584f2dd0af..974ab87c731e6d3f5c441cf65a6992a10d9d2eb7 100644 (file)
@@ -1,7 +1,6 @@
 #include "e_pixmap_intern.h"
 #include "e_comp_wl_buffer_intern.h"
 #include "e_comp_object_intern.h"
-#include "e_comp_intern.h"
 #include "e_view_intern.h"
 #include "e_view_client_intern.h"
 #include "e_compositor_intern.h"
@@ -772,7 +771,7 @@ EINTERN Eina_Bool
 e_pixmap_image_exists(const E_Pixmap *cp)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE);
-   return (!!cp->data) || (e_comp_gl_get() && (!cp->buffer->shm_buffer));
+   return (!!cp->data) || (e_comp->gl && (!cp->buffer->shm_buffer));
 }
 
 EINTERN Eina_Bool
index 7047d5459dcaae2974f92d6b0e0f27926bc1bfc8..ef6ca4de53cc82de6f09fe4468571e6cb33cac0e 100644 (file)
@@ -7,7 +7,6 @@
 #include "e_comp_wl_rsm_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
 #include "e_comp_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_input_intern.h"
 #include "e_input_device_intern.h"
 #include "e_input_backend_intern.h"
@@ -391,31 +390,26 @@ _zone_cb_client_eval_post_new_client(struct wl_listener *listener, void *data)
                   {
                      size_t psz = 0;
                      E_Zone *zf = z2;
-                     Eina_List *l, *comp_zone_list;
-
-                     if ((comp_zone_list = e_comp_zone_list_get()) != NULL)
-                       {
-                          EINA_LIST_FOREACH(comp_zone_list, l, z2)
-                            {
-                               int w, h;
-
-                               x = ec->x, y = ec->y, w = ec->w, h = ec->h;
-                               E_RECTS_CLIP_TO_RECT(x, y, w, h, z2->x, z2->y, z2->w, z2->h);
-                               if (w * h == z2->w * z2->h)
-                                 {
-                                    /* client fully covering zone */
-                                    zf = z2;
-                                    break;
-                                 }
-                               if ((unsigned)(w * h) > psz)
-                                 {
-                                    psz = w * h;
-                                    zf = z2;
-                                 }
-                            }
-                       }
-
-                     
+                     Eina_List *l;
+
+                     EINA_LIST_FOREACH(e_comp->zones, l, z2)
+                        {
+                           int w, h;
+
+                           x = ec->x, y = ec->y, w = ec->w, h = ec->h;
+                           E_RECTS_CLIP_TO_RECT(x, y, w, h, z2->x, z2->y, z2->w, z2->h);
+                           if (w * h == z2->w * z2->h)
+                              {
+                                 /* client fully covering zone */
+                                 zf = z2;
+                                 break;
+                              }
+                           if ((unsigned)(w * h) > psz)
+                              {
+                                 psz = w * h;
+                                 zf = z2;
+                              }
+                        }
                      zone = zf;
                   }
             }
@@ -508,14 +502,11 @@ _zone_cb_focus_focused_ec_changed(struct wl_listener *listener, void *data)
 EINTERN E_Zone *
 e_zone_new(int num, int id, int x, int y, int w, int h)
 {
-   E_Comp *comp;
    E_Zone *zone;
    Evas_Object *o;
    E_Event_Zone_Add *ev;
    char name[40];
 
-   if (!(comp = e_comp_get())) return NULL;
-
    zone = E_OBJECT_ALLOC(E_Zone, E_ZONE_TYPE, _e_zone_free);
    if (!zone) return NULL;
 
@@ -563,9 +554,9 @@ e_zone_new(int num, int id, int x, int y, int w, int h)
    snprintf(name, sizeof(name), "Zone %d", zone->num);
    zone->name = eina_stringshare_add(name);
 
-   comp->zones = eina_list_append(comp->zones, zone);
+   e_comp->zones = eina_list_append(e_comp->zones, zone);
 
-   o = evas_object_rectangle_add(comp->evas);
+   o = evas_object_rectangle_add(e_comp->evas);
    zone->bg_clip_object = o;
    evas_object_repeat_events_set(o, 1);
    evas_object_layer_set(o, E_LAYER_BG);
@@ -575,7 +566,7 @@ e_zone_new(int num, int id, int x, int y, int w, int h)
    evas_object_color_set(o, 255, 255, 255, 255);
    evas_object_show(o);
 
-   o = evas_object_rectangle_add(comp->evas);
+   o = evas_object_rectangle_add(e_comp->evas);
    zone->bg_event_object = o;
    evas_object_name_set(o, "zone->bg_event_object");
    evas_object_clip_set(o, zone->bg_clip_object);
@@ -755,25 +746,23 @@ e_zone_move_resize(E_Zone *zone,
 E_API E_Zone *
 e_zone_current_get(void)
 {
-   Eina_List *l = NULL, *comp_zone_list;
+   Eina_List *l = NULL;
    E_Zone *zone;
 
-   if (!(comp_zone_list = e_comp_zone_list_get())) return NULL;
-
    if (!starting)
      {
         int x, y;
 
         e_input_device_pointer_xy_get(NULL, &x, &y);
 
-        EINA_LIST_FOREACH(comp_zone_list, l, zone)
+        EINA_LIST_FOREACH(e_comp->zones, l, zone)
           {
              if (E_INSIDE(x, y, zone->x, zone->y, zone->w, zone->h))
                return zone;
           }
      }
-
-   return eina_list_data_get(comp_zone_list);
+   if (!e_comp->zones) return NULL;
+   return eina_list_data_get(e_comp->zones);
 }
 
 E_API int
@@ -797,12 +786,10 @@ e_zone_number_get(E_Zone *zone)
 EINTERN E_Zone *
 e_zone_get_by_id(int id)
 {
-   Eina_List *l = NULL, *comp_zone_list;
+   Eina_List *l = NULL;
    E_Zone *zone;
 
-   if (!(comp_zone_list = e_comp_zone_list_get())) return NULL;
-
-   EINA_LIST_FOREACH(comp_zone_list, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
         if (zone->id == id)
           {
@@ -817,12 +804,10 @@ e_zone_get_by_id(int id)
 EINTERN E_Zone *
 e_zone_get_by_position(int x, int y)
 {
-   Eina_List *l = NULL, *comp_zone_list;
+   Eina_List *l = NULL;
    E_Zone *zone;
 
-   if (!(comp_zone_list = e_comp_zone_list_get())) return NULL;
-
-   EINA_LIST_FOREACH(comp_zone_list, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
         if (E_INSIDE(x, y, zone->x, zone->y, zone->w, zone->h))
           {
@@ -1279,8 +1264,7 @@ _e_zone_free(E_Zone *zone)
 {
    int x, y;
    E_Zone_Obstacle *obs;
-   E_Comp *comp;
-   
+
    wl_signal_emit(&PRI(zone)->events.destroy, NULL);
 
    if(zone->focus) e_focus_del(zone->focus);
@@ -1302,11 +1286,7 @@ _e_zone_free(E_Zone *zone)
    E_FREE_LIST(zone->handlers, ecore_event_handler_del);
 
    if (zone->name) eina_stringshare_del(zone->name);
-
-   comp = e_comp_get();
-   if (comp)
-     comp->zones = eina_list_remove(comp->zones, zone);
-
+   e_comp->zones = eina_list_remove(e_comp->zones, zone);
    evas_object_del(zone->bg_event_object);
    evas_object_del(zone->bg_clip_object);
 
@@ -1860,9 +1840,7 @@ e_zone_visibility_calculate(E_Zone *zone)
 
    if (!e_config->calc_vis_without_effect)
      {
-         E_Comp *comp = e_comp_get();
-
-        if (comp && comp->animating) return EINA_FALSE;
+        if (e_comp->animating) return EINA_FALSE;
      }
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(zone, EINA_FALSE);
@@ -2109,38 +2087,34 @@ e_zone_visibility_calculate(E_Zone *zone)
 
    if (changed_list)
      {
-        E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-        if (comp_wl)
+        touched_ec = e_comp_wl->ptr.ec ? e_comp_wl->ptr.ec : e_comp_wl->touch.faked_ec;
+        EINA_LIST_FOREACH(changed_list, l, ec)
           {
-             touched_ec = comp_wl->ptr.ec ? comp_wl->ptr.ec : comp_wl->touch.faked_ec;
-             EINA_LIST_FOREACH(changed_list, l, ec)
-               {
-                  e_client_visibility_change_notify(ec);
+             e_client_visibility_change_notify(ec);
 
-                  if (ec == touched_ec)
-                     touched_win_changed = EINA_TRUE;
+             if (ec == touched_ec)
+               touched_win_changed = EINA_TRUE;
 
-                  if (e_client_visibility_get(ec) == E_VISIBILITY_UNOBSCURED)
+             if (e_client_visibility_get(ec) == E_VISIBILITY_UNOBSCURED)
+               {
+                  if (e_comp_wl->touch.pressed && !touched_win_changed && !e_policy_client_is_keyboard_sub(ec))
                     {
-                       if (comp_wl->touch.pressed && !touched_win_changed && !e_policy_client_is_keyboard_sub(ec))
+                       if (e_client_visibility_touched_check(ec))
                          {
-                            if (e_client_visibility_touched_check(ec))
-                              {
-                                 touched_win_changed = EINA_TRUE;
-                                 e_comp_wl_touch_cancel();
-                              }
+                            touched_win_changed = EINA_TRUE;
+                            e_comp_wl_touch_cancel();
                          }
                     }
-
-                  if (ec->visibility.changed)
-                    {
-                       ec->visibility.changed = 0;
-                       e_visibility_changed = EINA_TRUE;
-                    }
                }
 
-             changed_list = eina_list_free(changed_list);
+             if (ec->visibility.changed)
+               {
+                  ec->visibility.changed = 0;
+                  e_visibility_changed = EINA_TRUE;
+               }
           }
+
+        changed_list = eina_list_free(changed_list);
      }
    eina_tiler_free(t);
 
index 82477e9cbec31fe6172d9f66899218cf65dfeba2..9a855f0f751a82cf1208559641c8f523a617633b 100644 (file)
@@ -244,7 +244,7 @@ _e_info_server_ec_hwc_info_get(E_Client *ec, int *hwc, int *hwc_policy, int *pl_
    *hwc = -1;
    *pl_zpos = -999;
 
-   if ((!e_comp_hwc_is_configured()) || e_comp_hwc_deactive_get())
+   if ((!e_comp->hwc) || e_comp_hwc_deactive_get())
      return;
 
    *hwc = 0;
@@ -289,7 +289,7 @@ _e_info_server_cb_zone_info_get(const Eldbus_Service_Interface *iface EINA_UNUSE
    Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
 
    Eldbus_Message_Iter *array_of_zone;
-   Eina_List *l, *comp_zone_list;
+   Eina_List *l;
    E_Zone *zone = NULL;
    E_Zone *current_zone = NULL;
    int zone_id = -1;
@@ -301,27 +301,23 @@ _e_info_server_cb_zone_info_get(const Eldbus_Service_Interface *iface EINA_UNUSE
    eldbus_message_iter_arguments_append(iter, "("VALUE_TYPE_FOR_ZONE")", &array_of_zone);
 
    current_zone = e_zone_current_get();
-   comp_zone_list = e_comp_zone_list_get();
-   if (comp_zone_list)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
-        EINA_LIST_FOREACH(comp_zone_list, l, zone)
-          {
-             Eldbus_Message_Iter *struct_of_zone;
-             zone_id = zone->id;
-             disp_state = e_zone_display_state_get(zone);
-             if (current_zone == zone)
-               is_current_zone = EINA_TRUE;
-             else
-               is_current_zone = EINA_FALSE;
+        Eldbus_Message_Iter *struct_of_zone;
+        zone_id = zone->id;
+        disp_state = e_zone_display_state_get(zone);
+        if (current_zone == zone)
+          is_current_zone = EINA_TRUE;
+        else
+          is_current_zone = EINA_FALSE;
 
-             angle_cur = zone->rot.curr;
-             angle_active = zone->rot.act;
+        angle_cur = zone->rot.curr;
+        angle_active = zone->rot.act;
 
-             eldbus_message_iter_arguments_append(array_of_zone, "("VALUE_TYPE_FOR_ZONE")", &struct_of_zone);
-             eldbus_message_iter_arguments_append(struct_of_zone, VALUE_TYPE_FOR_ZONE, zone_id, disp_state, zone->x, zone->y, zone->w, zone->h, is_current_zone, angle_cur, angle_active);
+        eldbus_message_iter_arguments_append(array_of_zone, "("VALUE_TYPE_FOR_ZONE")", &struct_of_zone);
+        eldbus_message_iter_arguments_append(struct_of_zone, VALUE_TYPE_FOR_ZONE, zone_id, disp_state, zone->x, zone->y, zone->w, zone->h, is_current_zone, angle_cur, angle_active);
 
-             eldbus_message_iter_container_close(array_of_zone, struct_of_zone);
-          }
+        eldbus_message_iter_container_close(array_of_zone, struct_of_zone);
      }
 
    eldbus_message_iter_container_close(iter, array_of_zone);
@@ -441,7 +437,7 @@ _msg_clients_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
    eldbus_message_iter_arguments_append(iter, "a("VALUE_TYPE_FOR_TOPVWINS")", &array_of_ec);
 
    // append clients.
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         Eldbus_Message_Iter* struct_of_ec;
         Ecore_Window win;
@@ -553,19 +549,15 @@ _e_info_server_is_hwc_windows()
 static Eldbus_Message *
 _e_info_server_cb_window_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   E_Comp *comp;
-   
-   if (!(comp = e_comp_get())) return NULL;
-
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
    Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
 
    eldbus_message_iter_basic_append(iter, 'i', e_comp_gl_get());
    eldbus_message_iter_basic_append(iter, 'i', e_comp_config_get()->hwc);
    eldbus_message_iter_basic_append(iter, 'i', e_comp_config_get()->hwc_use_multi_plane);
-   eldbus_message_iter_basic_append(iter, 'i', comp->hwc);
+   eldbus_message_iter_basic_append(iter, 'i', e_comp->hwc);
    eldbus_message_iter_basic_append(iter, 'i', _e_info_server_is_hwc_windows());
-   eldbus_message_iter_basic_append(iter, 's', ecore_evas_engine_name_get(comp->ee));
+   eldbus_message_iter_basic_append(iter, 's', ecore_evas_engine_name_get(e_comp->ee));
    eldbus_message_iter_basic_append(iter, 'i', e_comp_config_get()->engine);
    eldbus_message_iter_basic_append(iter, 'i', e_config->use_buffer_flush);
    eldbus_message_iter_basic_append(iter, 'i', e_config->deiconify_approve);
@@ -579,14 +571,10 @@ _e_info_server_cb_window_info_get(const Eldbus_Service_Interface *iface EINA_UNU
 static Eldbus_Message *
 _e_info_server_cb_ec_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   E_Comp *comp;
-   
-   if (!(comp = e_comp_get())) return NULL;
-
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
    Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
 
-   eldbus_message_iter_basic_append(iter, 'i', comp->hwc);
+   eldbus_message_iter_basic_append(iter, 'i', e_comp->hwc);
    eldbus_message_iter_basic_append(iter, 'i', _e_info_server_is_hwc_windows());
 
    _msg_ecs_append(iter, EINA_TRUE);
@@ -596,14 +584,10 @@ _e_info_server_cb_ec_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED,
 static Eldbus_Message *
 _e_info_server_cb_all_ec_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   E_Comp *comp;
-   
-   if (!(comp = e_comp_get())) return NULL;
-
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
    Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
 
-   eldbus_message_iter_basic_append(iter, 'i', comp->hwc);
+   eldbus_message_iter_basic_append(iter, 'i', e_comp->hwc);
    eldbus_message_iter_basic_append(iter, 'i', _e_info_server_is_hwc_windows());
 
    _msg_ecs_append(iter, EINA_FALSE);
@@ -615,14 +599,10 @@ _e_info_server_cb_all_ec_info_get(const Eldbus_Service_Interface *iface EINA_UNU
 static Eldbus_Message *
 _e_info_server_cb_all_window_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   E_Comp *comp;
-   
-   if (!(comp = e_comp_get())) return NULL;
-
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
    Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
 
-   eldbus_message_iter_basic_append(iter, 'i', comp->hwc);
+   eldbus_message_iter_basic_append(iter, 'i', e_comp->hwc);
    eldbus_message_iter_basic_append(iter, 'i', _e_info_server_is_hwc_windows());
 
    _msg_clients_append(iter, EINA_FALSE);
@@ -752,7 +732,7 @@ _compobj_info_get(Evas_Object *po, Evas_Object *o, int depth)
         if (!e_util_strcmp(type, "edje"))
           {
              edje_object_file_get(po, &file, &group);
-             edit_obj = edje_edit_object_add(e_comp_evas_get());
+             edit_obj = edje_edit_object_add(e_comp->evas);
              if (edje_object_file_set(edit_obj, file, group))
                {
                   parts = edje_edit_parts_list_get(edit_obj);
@@ -874,7 +854,7 @@ _e_info_server_cb_compobjs(const Eldbus_Service_Interface *iface EINA_UNUSED, co
                                         &cobjs);
 
    /* 1. push: top-level evas objects */
-   for (o = evas_object_bottom_get(e_comp_evas_get()); o; o = evas_object_above_get(o))
+   for (o = evas_object_bottom_get(e_comp->evas); o; o = evas_object_above_get(o))
      {
         info = _obj_info_get(NULL, o, 0);
         if (!info) continue;
@@ -1033,37 +1013,33 @@ _msg_connected_clients_append(Eldbus_Message_Iter *iter)
                                                                eldbus_message_iter_arguments_append(struct_of_ec, "ss", (title), (__temp)); \
                                                                eldbus_message_iter_container_close(array_of_ec, struct_of_ec);})
 
-   Eina_List *comp_connected_ec_list = e_comp_connected_ec_list_get();
-   if (comp_connected_ec_list)
+   EINA_LIST_FOREACH(e_comp->connected_clients, l, cinfo)
      {
-        EINA_LIST_FOREACH(comp_connected_ec_list, l, cinfo)
+        __CONNECTED_CLIENTS_ARG_APPEND_TYPE("[Connected Clients]", "name:%20s pid:%3d uid:%3d gid:%3d", cinfo->name ?: "NO_NAME", cinfo->pid, cinfo->uid, cinfo->gid);
+        for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
           {
-             __CONNECTED_CLIENTS_ARG_APPEND_TYPE("[Connected Clients]", "name:%20s pid:%3d uid:%3d gid:%3d", cinfo->name ?: "NO_NAME", cinfo->pid, cinfo->uid, cinfo->gid);
-             for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
-               {
-                  Ecore_Window win;
-                  uint32_t res_id = 0;
-                  pid_t pid = -1;
+             Ecore_Window win;
+             uint32_t res_id = 0;
+             pid_t pid = -1;
 
-                  ec = evas_object_data_get(o, "E_Client");
-                  if (!ec) continue;
-                  if (e_client_util_ignored_get(ec)) continue;
+             ec = evas_object_data_get(o, "E_Client");
+             if (!ec) continue;
+             if (e_client_util_ignored_get(ec)) continue;
 
-                  win = e_client_util_win_get(ec);
+             win = e_client_util_win_get(ec);
 
-                  if (ec->pixmap)
-                     res_id = e_pixmap_res_id_get(ec->pixmap);
-                  if (ec->comp_data)
-                     {
-                        E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
-                        if (cdata->surface)
-                        wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
-                     }
-                  if (cinfo->pid == pid)
-                     {
-                        __CONNECTED_CLIENTS_ARG_APPEND_TYPE("[E_Client Info]", "win:0x%08zx res_id:%5d, name:%20s, geo:(%4d, %4d, %4dx%4d), layer:%5d, visible:%d, argb:%d",
-                                                            win, res_id, e_client_util_name_get(ec) ?: "NO_NAME", ec->x, ec->y, ec->w, ec->h, ec->layer, ec->visible, ec->argb);
-                     }
+             if (ec->pixmap)
+               res_id = e_pixmap_res_id_get(ec->pixmap);
+             if (ec->comp_data)
+               {
+                  E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+                  if (cdata->surface)
+                    wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL);
+               }
+             if (cinfo->pid == pid)
+               {
+                  __CONNECTED_CLIENTS_ARG_APPEND_TYPE("[E_Client Info]", "win:0x%08zx res_id:%5d, name:%20s, geo:(%4d, %4d, %4dx%4d), layer:%5d, visible:%d, argb:%d",
+                                                      win, res_id, e_client_util_name_get(ec) ?: "NO_NAME", ec->x, ec->y, ec->w, ec->h, ec->layer, ec->visible, ec->argb);
                }
           }
      }
@@ -1121,8 +1097,8 @@ _msg_clients_res_list_append(Eldbus_Message_Iter *iter, uint32_t mode, int id)
 
    eldbus_message_iter_arguments_append(iter, "a("VALUE_TYPE_REPLY_RESLIST")", &array_of_res);
 
-   if (!e_comp_get()) return;
-   if (!(wl_cdata = e_comp_wl_get())) return;
+   if (!e_comp) return;
+   if (!(wl_cdata = e_comp->wl_comp_data)) return;
    if (!wl_cdata->wl.disp) return;
 
    client_list = wl_display_get_client_list(wl_cdata->wl.disp);
@@ -2593,7 +2569,7 @@ _msg_window_prop_append(const Eldbus_Message *msg, uint32_t mode, const char *va
    iter = eldbus_message_iter_get(reply_msg);
    eldbus_message_iter_arguments_append(iter, "a(ss)", &array_of_ec);
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -2794,7 +2770,7 @@ static void _e_info_server_cb_wins_dump_topvwins(const char *dir, Eldbus_Message
    Dump_Win_Data *dump = NULL;
    E_Capture_Save_State state;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
 
@@ -2851,7 +2827,7 @@ static void _e_info_server_cb_wins_dump_ns(const char *dir)
 {
    Evas_Object *o;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         Ecore_Window win;
         E_Client *ec;
@@ -3075,7 +3051,7 @@ _e_info_server_cb_subsurface(const Eldbus_Service_Interface *iface EINA_UNUSED,
    eldbus_message_iter_arguments_append(iter, "a("SIGNATURE_SUBSURFACE")", &array_of_ec);
 
    // append clients.
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         Eldbus_Message_Iter* struct_of_ec;
         Ecore_Window win = 0, parent = 0;
@@ -3297,16 +3273,11 @@ _e_info_server_cb_rotation_message(const Eldbus_Service_Interface *iface EINA_UN
      ev->zone = e_zone_current_get();
    else
      {
-        Eina_List *comp_zone_list = e_comp_zone_list_get();
-        if (comp_zone_list)
+        EINA_LIST_FOREACH(e_comp->zones, l, z)
           {
-             EINA_LIST_FOREACH(comp_zone_list, l, z)
-               {
-                  if (z->num == zone_num)
-                  ev->zone = z;
-               }
+             if (z->num == zone_num)
+               ev->zone = z;
           }
-
      }
 
    if (!ev->zone)
@@ -3334,7 +3305,7 @@ protocol_cb_client_destroy(struct wl_listener *listener, void *data)
    pid_t client_pid = -1;
    const char *client_name = NULL;
    E_Comp_Connected_Client_Info *cinfo;
-   Eina_List *l, *comp_connected_ec_list;
+   Eina_List *l;
    char strbuf[512], *str_buff = strbuf;
    int str_r, str_l;
 
@@ -3346,16 +3317,12 @@ protocol_cb_client_destroy(struct wl_listener *listener, void *data)
    clock_gettime(CLOCK_MONOTONIC, &tp);
    time = (tp.tv_sec * 1000000L) + (tp.tv_nsec / 1000);
 
-   comp_connected_ec_list = e_comp_connected_ec_list_get();
-   if (comp_connected_ec_list)
+   EINA_LIST_FOREACH(e_comp->connected_clients, l, cinfo)
      {
-        EINA_LIST_FOREACH(comp_connected_ec_list, l, cinfo)
+        if (cinfo->pid == client_pid)
           {
-             if (cinfo->pid == client_pid)
-               {
-                  client_name = cinfo->name;
-                  break;
-               }
+              client_name = cinfo->name;
+              break;
           }
      }
 
@@ -3424,7 +3391,7 @@ _e_info_server_protocol_debug_func2(void *user_data, enum wl_protocol_logger_typ
    unsigned int time;
    pid_t client_pid = -1;
    E_Comp_Connected_Client_Info *cinfo;
-   Eina_List *l, *comp_connected_ec_list;
+   Eina_List *l;
    char strbuf[512], *str_buff = strbuf;
    int str_r, str_l;
 
@@ -3445,15 +3412,10 @@ _e_info_server_protocol_debug_func2(void *user_data, enum wl_protocol_logger_typ
    elog.client_pid = client_pid;
    elog.target_id = wl_resource_get_id(message->resource);
    snprintf(elog.name, PATH_MAX, "%s:%s", wl_resource_get_class(message->resource), message->message->name);
-
-   comp_connected_ec_list = e_comp_connected_ec_list_get();
-   if (comp_connected_ec_list)
+   EINA_LIST_FOREACH(e_comp->connected_clients, l, cinfo)
      {
-        EINA_LIST_FOREACH(comp_connected_ec_list, l, cinfo)
-          {
-             if (cinfo->pid == client_pid)
-               snprintf(elog.cmd, PATH_MAX, "%s", cinfo->name);
-          }      
+        if (cinfo->pid == client_pid)
+          snprintf(elog.cmd, PATH_MAX, "%s", cinfo->name);
      }
 
    if (!e_info_protocol_rule_validate(&elog)) return;
@@ -3562,8 +3524,7 @@ _e_info_server_cb_protocol_trace(const Eldbus_Service_Interface *iface EINA_UNUS
           wl_protocol_logger_destroy(e_info_protocol_logger);
           e_info_protocol_logger = NULL;
        }
-
-   e_info_protocol_logger = wl_display_add_protocol_logger(e_comp_wl_display_get(), _e_info_server_protocol_debug_func2, NULL);
+     e_info_protocol_logger = wl_display_add_protocol_logger(e_comp->wl_comp_data->wl.disp, _e_info_server_protocol_debug_func2, NULL);
 
    return reply;
 }
@@ -3707,24 +3668,20 @@ _e_info_server_cb_keygrab_status_get(const Eldbus_Service_Interface *iface EINA_
 static Eldbus_Message *
 _e_info_server_cb_bgcolor_set(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   E_Comp *comp;
    int a, r, g, b;
    int pa, pr, pg, pb;
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
 
-   comp = e_comp_get();
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, NULL);
-
    if (!eldbus_message_arguments_get(msg, "iiii", &a, &r, &g, &b))
      {
         ERR("Error on getting argument from the given message.");
         return reply;
      }
 
-   e_view_color_get(comp->bg_blank_view, &pa, &pr, &pg, &pb);
-   e_view_color_set(comp->bg_blank_view, r, g, b, a);
+   e_view_color_get(e_comp->bg_blank_view, &pa, &pr, &pg, &pb);
+   e_view_color_set(e_comp->bg_blank_view, r, g, b, a);
 
    INF("The background color of bg_blank_view has been changed.");
    INF("(A, R, G, B) : %d, %d, %d, %d -> %d, %d, %d, %d", pa, pr, pg, pb, a, r, g, b);
@@ -3783,7 +3740,7 @@ e_info_server_cb_transform_message(const Eldbus_Service_Interface *iface EINA_UN
 
    value_number = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         Ecore_Window win;
@@ -4122,7 +4079,6 @@ _e_info_server_cb_buffer_dump(const Eldbus_Service_Interface *iface EINA_UNUSED,
 
    if (start == 1)
      {
-        int comp_w = 0, comp_h = 0;
         if (e_info_dump_running == 1)
           {
              eldbus_message_arguments_append(reply, "is", 0, (e_info_dump_path ?: "nopath"));
@@ -4169,12 +4125,13 @@ _e_info_server_cb_buffer_dump(const Eldbus_Service_Interface *iface EINA_UNUSED,
           }
 
         /* start dump */
-        e_comp_size_get(&comp_w, &comp_h);
         if (scale > 0.0)
           tbm_surface_internal_dump_with_scale_start(e_info_dump_path,
-                                                     comp_w, comp_h, count, scale);
+                                                     e_comp->w,
+                                                     e_comp->h,
+                                                     count, scale);
         else
-          tbm_surface_internal_dump_start(e_info_dump_path, comp_w, comp_h, count);
+          tbm_surface_internal_dump_start(e_info_dump_path, e_comp->w, e_comp->h, count);
 
         if (e_info_dump_server_or_client != 2)
           {
@@ -4252,7 +4209,7 @@ _e_info_server_cb_selected_buffer_dump(const Eldbus_Service_Interface *iface EIN
 
      win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         E_Client *ec = evas_object_data_get(o, "E_Client");
         Ecore_Window win;
@@ -4644,13 +4601,13 @@ e_info_server_cb_hwc(const Eldbus_Service_Interface *iface EINA_UNUSED, const El
         return reply;
      }
 
-   if (!e_comp_hwc_is_configured())
+   if (!e_comp->hwc)
      {
         ERR("Error HWC is not initialized.");
         return reply;
      }
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_get(), reply);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, reply);
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen_get(), reply);
 
    switch (info)
@@ -4774,7 +4731,7 @@ _e_info_server_find_client_by_win_id(uint64_t win_id)
    Evas_Object *o;
    E_Client *ec;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -4937,8 +4894,7 @@ _e_info_server_cb_fps_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED
      }
    else
      {
-        E_Comp *comp = e_comp_get();
-        if (comp) comp->calc_fps = 1;
+        e_comp->calc_fps = 1;
         _msg_output_fps_append(eldbus_message_iter_get(reply));
      }
 
@@ -5006,7 +4962,7 @@ e_info_server_cb_quickpanel_control(const Eldbus_Service_Interface *iface EINA_U
 
         win_id = (uint64_t)tmp;
 
-        for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+        for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
           {
              ec = evas_object_data_get(o, "E_Client");
              if (!ec) continue;
@@ -5119,7 +5075,7 @@ e_info_server_cb_aux_message(const Eldbus_Service_Interface *iface EINA_UNUSED,
 
    win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -5168,7 +5124,7 @@ e_info_server_cb_aux_hint_add(const Eldbus_Service_Interface *iface EINA_UNUSED,
 
    win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -5213,7 +5169,7 @@ e_info_server_cb_aux_hint_del(const Eldbus_Service_Interface *iface EINA_UNUSED,
 
    win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -5237,7 +5193,6 @@ _e_info_server_cb_force_render(const Eldbus_Service_Interface *iface EINA_UNUSED
    Eina_Bool res;
    char result[1024];
    E_Client *ec = NULL;
-   int comp_w = 0, comp_h = 0;
 
    res = eldbus_message_arguments_get(msg,
                                       "i",
@@ -5252,8 +5207,7 @@ _e_info_server_cb_force_render(const Eldbus_Service_Interface *iface EINA_UNUSED
               if (ec->visible && (!ec->input_only))
                 e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
            }
-         e_comp_size_get(&comp_w, &comp_h);
-         evas_damage_rectangle_add(e_comp_evas_get(), 0, 0, comp_w, comp_h);
+         evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->w, e_comp->h);
          e_comp_render_queue();
          snprintf(result, sizeof(result),
                   "[Server] force rendered all clients and canvas\n");
@@ -5269,8 +5223,7 @@ _e_info_server_cb_force_render(const Eldbus_Service_Interface *iface EINA_UNUSED
                   "[Server] updated clients' surface");
          break;
       case E_INFO_CMD_FRENDER_CANVAS:
-         e_comp_size_get(&comp_w, &comp_h);
-         evas_damage_rectangle_add(e_comp_evas_get(), 0, 0, comp_w, comp_h);
+         evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->w, e_comp->h);
          snprintf(result, sizeof(result),
                   "[Server] updated canvas");
          break;
@@ -5390,7 +5343,7 @@ _e_info_server_top_win_at_xy_get(int x, int y)
    Evas_Object *o;
    E_Client *ec;
 
-   o = evas_object_top_at_xy_get(e_comp_evas_get(), x, y, EINA_FALSE, EINA_FALSE);
+   o = evas_object_top_at_xy_get(e_comp->evas, x, y, EINA_FALSE, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(o, 0);
 
    ec = evas_object_data_get(o, "E_Client");
@@ -5462,7 +5415,7 @@ _e_info_server_ec_find_by_win(Ecore_Window win)
    E_Client *ec;
    Evas_Object *o;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         Ecore_Window w;
 
@@ -5493,8 +5446,8 @@ _e_info_server_pid_kill(pid_t id, Eldbus_Message_Iter *array_of_string)
    struct wl_list * client_list;
    struct wl_client *client;
 
-   if (!e_comp_get()) return 0;
-   if (!(wl_cdata = e_comp_wl_get())) return 0;
+   if (!e_comp) return 0;
+   if (!(wl_cdata = e_comp->wl_comp_data)) return 0;
    if (!wl_cdata->wl.disp) return 0;
 
    client_list = wl_display_get_client_list(wl_cdata->wl.disp);
@@ -5525,7 +5478,7 @@ _e_info_server_ec_kill(uint32_t mode, void *value, Eldbus_Message_Iter *array_of
    int count = 0;
    char result[1024];
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         const char *ec_name, *find;
 
@@ -5676,7 +5629,7 @@ _e_info_server_cb_get_windows(const Eldbus_Service_Interface *iface EINA_UNUSED,
 
    eldbus_message_iter_arguments_append(iter, "at", &array_of_windows);
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         const char *ec_name, *find;
         Ecore_Window win;
@@ -5882,7 +5835,7 @@ _e_info_server_cb_wininfo(const Eldbus_Service_Interface *iface EINA_UNUSED, con
 
    _e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos);
 
-   ecore_evas_screen_geometry_get(e_comp_ee_get(), NULL, NULL, &dw, &dh);
+   ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &dw, &dh);
 
    xright = dw - ec->x - ec->border_size * 2 - ec->w;
    ybelow = dh - ec->y - ec->border_size * 2 - ec->h;
@@ -6357,7 +6310,6 @@ static Eldbus_Message *
 _e_info_server_cb_key_repeat(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
-   E_Comp_Wl_Data *comp_wl;
    const char *path = NULL;
    int rate = 0, delay = 0;
    FILE *log_fp;
@@ -6367,7 +6319,7 @@ _e_info_server_cb_key_repeat(const Eldbus_Service_Interface *iface EINA_UNUSED,
         ERR("Error getting arguments.");
         return reply;
      }
-   if (!(comp_wl = e_comp_wl_get())) return reply;
+   if (!e_comp_wl) return reply;
 
    if (path && strlen(path) > 0)
      {
@@ -6393,22 +6345,20 @@ _e_info_server_cb_key_repeat(const Eldbus_Service_Interface *iface EINA_UNUSED,
 static Eldbus_Message *
 _e_info_server_cb_memchecker(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   E_Comp *comp = e_comp_get();
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
 
-   if (!(comp = e_comp_get())) return reply;
-
-   if (comp->func_memory_dump)
+   if (e_comp->func_memory_dump)
      {
-        comp->func_memory_dump();
+        e_comp->func_memory_dump();
      }
    else
      {
-        comp->func_memory_dump = dlsym(RTLD_NEXT, "e_memcheck_dump");
-        if (comp->func_memory_dump)
-          comp->func_memory_dump();
+        e_comp->func_memory_dump = dlsym(RTLD_NEXT, "e_memcheck_dump");
+        if (e_comp->func_memory_dump)
+          e_comp->func_memory_dump();
         else
           ERR("Not available to dump memory");
+
      }
 
    return reply;
@@ -6431,9 +6381,9 @@ static void
 _input_rect_draw(int x, int y, int w, int h, int time, int color_r, int color_g, int color_b)
 {
    Evas_Object *rect;
-   EINA_SAFETY_ON_NULL_RETURN(e_comp_evas_get());
+   EINA_SAFETY_ON_NULL_RETURN(e_comp->evas);
 
-   rect = evas_object_rectangle_add(e_comp_evas_get());
+   rect = evas_object_rectangle_add(e_comp->evas);
    EINA_SAFETY_ON_NULL_RETURN(rect);
 
    evas_object_color_set(rect, color_r, color_g, color_b, 150);
@@ -6500,7 +6450,7 @@ _e_info_server_cb_input_region(const Eldbus_Service_Interface *iface EINA_UNUSED
         ERR("Error getting arguments.");
         return reply;
      }
-   if (!e_comp_get()) return reply;
+   if (!e_comp) return reply;
 
    if (strlen(win_id_str) >= 2 && win_id_str[0] == '0' && win_id_str[1] == 'x')
      res = e_util_string_to_ulong(win_id_str, &tmp, 16);
@@ -6514,7 +6464,7 @@ _e_info_server_cb_input_region(const Eldbus_Service_Interface *iface EINA_UNUSED
      }
    win_id_value = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -6731,19 +6681,15 @@ _msg_view_append(Eldbus_Message_Iter *iter, Eina_Bool is_visible)
 static Eldbus_Message *
 _e_info_server_cb_view_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
 {
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return NULL;
-
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
    Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
 
    eldbus_message_iter_basic_append(iter, 'i', e_comp_gl_get());
    eldbus_message_iter_basic_append(iter, 'i', e_comp_config_get()->hwc);
    eldbus_message_iter_basic_append(iter, 'i', e_comp_config_get()->hwc_use_multi_plane);
-   eldbus_message_iter_basic_append(iter, 'i', comp->hwc);
+   eldbus_message_iter_basic_append(iter, 'i', e_comp->hwc);
    eldbus_message_iter_basic_append(iter, 'i', _e_info_server_is_hwc_windows());
-   eldbus_message_iter_basic_append(iter, 's', ecore_evas_engine_name_get(comp->ee));
+   eldbus_message_iter_basic_append(iter, 's', ecore_evas_engine_name_get(e_comp->ee));
    eldbus_message_iter_basic_append(iter, 'i', e_comp_config_get()->engine);
    eldbus_message_iter_basic_append(iter, 'i', e_config->use_buffer_flush);
    eldbus_message_iter_basic_append(iter, 'i', e_config->deiconify_approve);
@@ -7009,7 +6955,7 @@ _e_info_server_cb_filter(const Eldbus_Service_Interface *iface EINA_UNUSED, cons
 
    if (win_number != 0x0)
      {
-        for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+        for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
           {
              ec = evas_object_data_get(o, "E_Client");
              if (!ec) continue;
@@ -7059,7 +7005,7 @@ _e_info_server_cb_filter(const Eldbus_Service_Interface *iface EINA_UNUSED, cons
      {
         char current_filter[15] = {0};
         //return current filter mode
-        switch (e_comp_image_filter_get())
+        switch (e_comp->image_filter)
           {
            case E_COMP_IMAGE_FILTER_BLUR:
               snprintf(current_filter, sizeof(current_filter), "blur");
@@ -7208,7 +7154,7 @@ _e_info_server_cb_basic_operation_generate(const Eldbus_Service_Interface *iface
 
    win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -7261,7 +7207,7 @@ _e_info_server_cb_zone_set(const Eldbus_Service_Interface *iface EINA_UNUSED, co
 
    win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         Ecore_Window win;
@@ -7350,7 +7296,7 @@ e_info_server_cb_resize_ppu_set(const Eldbus_Service_Interface *iface EINA_UNUSE
 
    win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         Ecore_Window win;
@@ -7420,7 +7366,7 @@ _e_info_server_cb_prop_set(const Eldbus_Service_Interface *iface EINA_UNUSED, co
 
    win_id = (uint64_t)tmp;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
         if (!ec) continue;
@@ -7748,7 +7694,7 @@ e_info_server_protocol_trace_path_init(char *trace_path)
         e_info_protocol_logger = NULL;
      }
 
-   e_info_protocol_logger = wl_display_add_protocol_logger(e_comp_wl_display_get(), _e_info_server_protocol_debug_func2, NULL);
+   e_info_protocol_logger = wl_display_add_protocol_logger(e_comp->wl_comp_data->wl.disp, _e_info_server_protocol_debug_func2, NULL);
 
    return EINA_TRUE;
 }
index 00641d5d19da76f95319a1987282cf0c4fe0245c..cf334b0f85955bd976127bc2a9454547260bfd63 100644 (file)
@@ -465,7 +465,7 @@ _e_test_helper_message_append_clients(Eldbus_Message_Iter *iter)
 
    EINA_SAFETY_ON_NULL_RETURN(th_data);
 
-   if (!(comp = e_comp_get())) return;
+   if (!(comp = e_comp)) return;
 
    eldbus_message_iter_arguments_append(iter, "a("E_TH_SIGN_WIN_INFO")", &array_of_ec);
 
@@ -796,7 +796,7 @@ _e_test_helper_cb_kill_win(const Eldbus_Service_Interface *iface, const Eldbus_M
         return reply;
      }
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         const char *ec_name = NULL;
         ec = evas_object_data_get(o, "E_Client");
@@ -920,7 +920,7 @@ _e_test_helper_cb_hwc(const Eldbus_Service_Interface *iface, const Eldbus_Messag
    r = eldbus_message_arguments_get(msg, "u", &on);
    EINA_SAFETY_ON_FALSE_RETURN_VAL(r, reply);
 
-   if (e_comp_hwc_is_configured())
+   if (e_comp->hwc)
      {
         switch (on)
           {
index c2c415f9c0c1c5715ce72a8473d4ee0c37f3d403..9984e5dd8f219bb0c8edfce4bc16ce658abfddcb 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_hwc_intern.h"
 #include "e_utils_intern.h"
 #include "e_comp_screen_intern.h"
-#include "e_comp_canvas_intern.h"
 #include "e_comp_intern.h"
 #include "e_error_intern.h"
 #include "e_hwc_window_queue_intern.h"
@@ -241,7 +240,7 @@ _e_hwc_gbm_surface_alloc(void *data, int w, int h)
 
    if (output->tdm_hwc)
      {
-        EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_get(), NULL);
+        EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
 
         gdevice = e_display_gbm_device_get();
         EINA_SAFETY_ON_NULL_RETURN_VAL(gdevice, NULL);
@@ -281,11 +280,9 @@ _e_hwc_gbm_surface_free(void *data, void *gsurface)
 static Ecore_Evas *
 _e_hwc_ecore_evas_tbm_alloc(E_Hwc *hwc, int src_w, int src_h)
 {
-   E_Comp *comp;
    Ecore_Evas *ee;
 
-   comp = e_comp_get();
-   if (comp && comp->avoid_afill)
+   if (e_comp->avoid_afill)
      {
         ee = ecore_evas_tbm_allocfunc_new("gl_tbm_ES", src_w, src_h,
                                           _e_hwc_tbm_surface_queue_alloc,
@@ -300,7 +297,7 @@ _e_hwc_ecore_evas_tbm_alloc(E_Hwc *hwc, int src_w, int src_h)
                                           (void *)hwc);
      }
 
-   EHINF("ecore_evas engine:gl_tbm ee:%p avoid_afill:%d", hwc, ee, comp ? comp->avoid_afill : 0);
+   EHINF("ecore_evas engine:gl_tbm ee:%p avoid_afill:%d", hwc, ee, e_comp->avoid_afill);
 
    return ee;
 }
@@ -308,7 +305,6 @@ _e_hwc_ecore_evas_tbm_alloc(E_Hwc *hwc, int src_w, int src_h)
 static Ecore_Evas *
 _e_hwc_ecore_evas_gbm_alloc(E_Hwc *hwc, int src_w, int src_h)
 {
-   E_Comp *comp;
    Ecore_Evas *ee;
    struct gbm_device *gdevice;
    int gbm_formats[2] = {GBM_FORMAT_ABGR8888, GBM_FORMAT_ARGB8888};
@@ -318,12 +314,11 @@ _e_hwc_ecore_evas_gbm_alloc(E_Hwc *hwc, int src_w, int src_h)
    if (!gdevice) return NULL;
 
    format_count = sizeof(gbm_formats) / sizeof(int);
-   comp = e_comp_get();
    for (i = 0; i < format_count; i++)
      {
         hwc->gbm_format = gbm_formats[i];
 
-        if (comp && comp->avoid_afill)
+        if (e_comp->avoid_afill)
           {
              ee = ecore_evas_tbm_native_allocfunc_new("gl_tbm_ES", gdevice, src_w, src_h,
                                                       _e_hwc_gbm_surface_alloc,
@@ -341,7 +336,7 @@ _e_hwc_ecore_evas_gbm_alloc(E_Hwc *hwc, int src_w, int src_h)
         if (ee) break;
      }
 
-   EHINF("ecore_evas engine:gl_tbm with gbm ee:%p avaoid_afill:%d", hwc, ee, comp ? comp->avoid_afill : 0);
+   EHINF("ecore_evas engine:gl_tbm with gbm ee:%p avaoid_afill:%d", hwc, ee, e_comp->avoid_afill);
 
    return ee;
 }
@@ -369,7 +364,7 @@ _e_hwc_prefer_gbm_check(void)
    const char *backend_name;
    struct gbm_device *gdevice;
 
-   if (e_comp_hwc_is_prefer_gbm())
+   if (e_comp->hwc_prefer_gbm)
       return EINA_TRUE;
 
    gdevice = e_display_gbm_device_get();
@@ -392,9 +387,6 @@ e_hwc_ecore_evas_init(void)
    E_Hwc *hwc;
    int screen_rotation;
    char buf[1024];
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);   
 
    primary_output = e_display_primary_output_get();
    EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
@@ -466,18 +458,18 @@ e_hwc_ecore_evas_init(void)
      }
 
    hwc->ee = ee;
-   hwc->evas = ecore_evas_get(ee);
+   hwc->evas = ecore_evas_get(hwc->ee);
 
    EHINF("ee(%p) with the tqueue(%p) is created.", hwc, ee, hwc->target_buffer_queue);
 
-   comp->ee = ee;
-   ecore_evas_data_set(ee, "comp", e_comp_get());
+   e_comp->ee = ee;
+   ecore_evas_data_set(e_comp->ee, "comp", e_comp);
 
    if (screen_rotation)
      {
         /* SHOULD called with resize option after ecore_evas_resize */
-        ecore_evas_rotation_with_resize_set(ee, screen_rotation);
-        ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+        ecore_evas_rotation_with_resize_set(e_comp->ee, screen_rotation);
+        ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &w, &h);
         snprintf(buf, sizeof(buf), "\tEE Rotate and Resize %d, %dx%d", screen_rotation, w, h);
         e_main_ts(buf);
      }
@@ -723,7 +715,6 @@ e_hwc_client_is_above_hwc(E_Client *ec, E_Client *hwc_ec)
 {
    E_View *view, *view_hwc, *view_tmp;
    E_Canvas_Layer layer, layer_hwc;
-   E_Canvas *comp_canvas = e_comp_canvas_get();
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_ec, EINA_FALSE);
@@ -734,15 +725,15 @@ e_hwc_client_is_above_hwc(E_Client *ec, E_Client *hwc_ec)
    view = e_view_client_view_get(e_client_view_get(ec));
    view_hwc = e_view_client_view_get(e_client_view_get(hwc_ec));
 
-   layer = e_canvas_layer_find(comp_canvas, view);
-   layer_hwc = e_canvas_layer_find(comp_canvas, view_hwc);
+   layer = e_canvas_layer_find(e_comp->canvas, view);
+   layer_hwc = e_canvas_layer_find(e_comp->canvas, view_hwc);
 
    /* compare layer */
    if (layer_hwc > layer) return EINA_FALSE;
    if (layer > layer_hwc) return EINA_TRUE;
 
    view_tmp = e_view_above_get(view);
-   if (e_canvas_layer_find(comp_canvas, view_tmp) == layer_hwc)
+   if (e_canvas_layer_find(e_comp->canvas, view_tmp) == layer_hwc)
      {
         do
           {
@@ -750,7 +741,7 @@ e_hwc_client_is_above_hwc(E_Client *ec, E_Client *hwc_ec)
                return EINA_TRUE;
              view_tmp = e_view_above_get(view_tmp);
           }
-        while (view_tmp && (e_canvas_layer_find(comp_canvas, view_tmp) == layer_hwc));
+        while (view_tmp && (e_canvas_layer_find(e_comp->canvas, view_tmp) == layer_hwc));
      }
    else
      return EINA_TRUE;
index d9cdab0c8d4d0f0525751c0823332e66f957242d..b29b6a0bc12d5027d6d51d3414a4799be3fc1fb3 100644 (file)
@@ -1,6 +1,5 @@
 #include "e_hwc_planes_intern.h"
 #include "e_screen_rotation_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_comp_intern.h"
 #include "services/e_service_quickpanel_intern.h"
 #include "e_output_intern.h"
@@ -88,8 +87,7 @@ _e_hwc_planes_ec_check(E_Client *ec)
      {
         if (e_screen_rotation_ignore_output_transform_watch(ec))
           {
-            E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-            if (comp_wl && comp_wl->touch.pressed)
+            if (e_comp_wl->touch.pressed)
               return EINA_FALSE;
           }
         else
@@ -206,7 +204,7 @@ _e_hwc_planes_prepare_plane(E_Hwc *hwc, int n_vis, int n_skip, Eina_List *hwc_cl
    if (n_ec <= 0) return EINA_FALSE;
 
    // list up available_hw layers E_Client can be set
-   // if e_comp_get()->hwc_use_multi_plane FALSE, than use only fb target plane
+   // if e_comp->hwc_use_multi_plane FALSE, than use only fb target plane
    ep_l = e_output_planes_get(eout);
    EINA_LIST_FOREACH(ep_l, l, ep)
      {
@@ -234,7 +232,7 @@ _e_hwc_planes_prepare_plane(E_Hwc *hwc, int n_vis, int n_skip, Eina_List *hwc_cl
      {
         nouse = n_ly - n_ec;
      }
-   else if ((n_ly < n_vis) || // e_comp_evas_get() on fb target plane
+   else if ((n_ly < n_vis) || // e_comp->evas on fb target plane
             (n_ec < n_vis))
      {
         if (n_ec <= n_ly) nouse = n_ly - n_ec - 1;
@@ -419,12 +417,10 @@ _e_hwc_planes_prepare(E_Hwc *hwc, E_Zone *zone)
    Eina_List *hwc_ok_clist = NULL, *vis_clist = NULL;
    E_Output *output = hwc->output;
    E_View *view;
-   E_Comp *comp;
 
    _e_hwc_planes_prepare_init(hwc);
 
-   comp = e_comp_get();
-   if (comp && comp->nocomp_override > 0) return EINA_FALSE;
+   if (e_comp->nocomp_override > 0) return EINA_FALSE;
 
    vis_clist = e_comp_vis_ec_list_get(zone);
    if (!vis_clist) return EINA_FALSE;
@@ -500,7 +496,7 @@ _e_hwc_planes_usable(E_Hwc *hwc)
    e_comp_hook_call(E_COMP_HOOK_PREPARE_PLANE, NULL);
 
    // It is not hwc_usable if cursor is shown when the hw cursor is not supported by libtdm.
-   if (!e_pointer_is_hidden(e_comp_pointer_get()) &&
+   if (!e_pointer_is_hidden(e_comp->pointer) &&
        (eout->cursor_available.max_w == -1 || eout->cursor_available.max_h == -1))
      return EINA_FALSE;
 
@@ -876,7 +872,6 @@ e_hwc_planes_presentation_update(E_Hwc *hwc, E_Client *ec)
 
    if (ec)
      {
-        E_Comp_Wl_Data *comp_wl;
         e_plane_ec_set(ep, ec);
 
         /* update the target_buffer */
@@ -884,9 +879,7 @@ e_hwc_planes_presentation_update(E_Hwc *hwc, E_Client *ec)
         EINA_SAFETY_ON_NULL_RETURN_VAL(wl_buffer, EINA_FALSE);
         EINA_SAFETY_ON_NULL_RETURN_VAL(wl_buffer->resource, EINA_FALSE);
 
-        comp_wl = e_comp_wl_get();
-        if (comp_wl)
-          tsurface = wayland_tbm_server_get_surface(comp_wl->tbm.server, wl_buffer->resource);
+        tsurface = wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server, wl_buffer->resource);
         EINA_SAFETY_ON_NULL_RETURN_VAL(tsurface, EINA_FALSE);
 
         ep->tsurface = tsurface;
index bbade63a6e18ff28b8965d2008bb1698ab21e00a..edad9b713f56cb93d3d07b1a0339947d4b2bc0ec 100644 (file)
@@ -4,7 +4,6 @@
 #include "e_hwc_window_queue_intern.h"
 #include "e_comp_wl_buffer_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
 #include "e_comp_wl_tbm_intern.h"
 #include "e_pointer_intern.h"
@@ -312,7 +311,7 @@ static tbm_surface_h
 _e_hwc_window_client_surface_acquire(E_Hwc_Window *hwc_window)
 {
    E_Comp_Wl_Buffer *buffer = _e_hwc_window_comp_wl_buffer_get(hwc_window);
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
+   E_Comp_Wl_Data *wl_comp_data = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    tbm_surface_h tsurface = NULL;
 
    if (!buffer) return NULL;
@@ -324,7 +323,7 @@ _e_hwc_window_client_surface_acquire(E_Hwc_Window *hwc_window)
          break;
        case E_COMP_WL_BUFFER_TYPE_NATIVE:
        case E_COMP_WL_BUFFER_TYPE_VIDEO:
-         tsurface = wayland_tbm_server_get_surface(comp_wl->tbm.server, buffer->resource);
+         tsurface = wayland_tbm_server_get_surface(wl_comp_data->tbm.server, buffer->resource);
          break;
        case E_COMP_WL_BUFFER_TYPE_TBM:
          tsurface = buffer->tbm_surface;
@@ -507,8 +506,7 @@ _e_hwc_window_cursor_position_get(E_Pointer *ptr, E_Output *output, int width, i
 static void
 _e_hwc_window_update_fps(E_Hwc_Window *hwc_window)
 {
-   E_Comp *comp = e_comp_get();
-   if (comp && comp->calc_fps)
+   if (e_comp->calc_fps)
      {
         double dt;
         double tim = ecore_time_get();
@@ -3721,7 +3719,7 @@ e_hwc_window_client_geometry_visible_get(E_Hwc_Window *hwc_window)
    ec = hwc_window->ec;
    if (!ec) return EINA_FALSE;
 
-   ecore_evas_geometry_get(e_comp_ee_get(), NULL, NULL, &ee_w, &ee_h);
+   ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &ee_w, &ee_h);
    e_client_geometry_get(ec, &x, &y, &w, &h);
 
    view = e_view_client_view_get(e_client_view_get(ec));
index c68e943315e1d0faab38b816ce68756175ea21d5..89ae4be7284a43816a324c8aa0879c9772b759e2 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_comp_wl_intern.h"
 #include "e_comp_wl_renderer_intern.h"
 #include "e_comp_wl_tbm_intern.h"
-#include "e_comp_intern.h"
 #include "e_pixmap_intern.h"
 #include "e_hwc_window_intern.h"
 #include "e_hwc_intern.h"
@@ -125,7 +124,7 @@ static E_Hwc_Window_Queue_Manager *_hwc_winq_mgr = NULL;
 static uint32_t
 _comp_wl_buffer_flags_get(E_Comp_Wl_Buffer *buffer)
 {
-   E_Comp_Wl_Data *wl_cdata = e_comp_wl_get();
+   E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    uint32_t flags = 0;
 
    if (!buffer) return 0;
@@ -967,7 +966,7 @@ _e_hwc_window_queue_prepare_set(E_Hwc_Window_Queue *queue, E_Hwc_Window *hwc_win
 
    queue->state = E_HWC_WINDOW_QUEUE_STATE_SET_WAITING_WAIT_USABLE;
 
-   if (e_comp_hwc_send_redraw_request())
+   if (e_comp->hwc_send_redraw_request)
      e_comp_wl_renderer_client_redraw_request_send(hwc_window->ec);
 
    EHWQINF("Set Waiting wait usable user ehw:%p - {%s}",
index ced6794baaa871d1deb5e5f5ac133a228bee7da6..578f86bec2ddc0fe95e98ca91e8935eea6730165 100644 (file)
@@ -4,7 +4,6 @@
 #include "e_explicit_sync_intern.h"
 #include "e_comp_wl_tbm_intern.h"
 #include "e_comp_wl_tizen_hwc_intern.h"
-#include "e_comp_intern.h"
 #include "e_pixmap_intern.h"
 #include "e_presentation_time_intern.h"
 #include "e_output_intern.h"
@@ -110,8 +109,7 @@ _e_hwc_windows_comp_wl_buffer_get(E_Hwc_Window *hwc_window)
 static void
 _e_hwc_windows_update_fps(E_Hwc *hwc)
 {
-   E_Comp *comp = e_comp_get();   
-   if (comp && comp->calc_fps)
+   if (e_comp->calc_fps)
      {
         double dt;
         double tim = ecore_time_get();
@@ -477,10 +475,9 @@ _e_hwc_windows_commit_handler_timer_set(E_Hwc *hwc, E_Hwc_Windows_Commit_Data *w
 
    if (set)
      {
-        E_Comp *comp = e_comp_get();
-        if (comp && comp->commit_handler_timer.use)
+        if (e_comp->commit_handler_timer.use)
           {
-             wins_commit_data->commit_handler_timer = ecore_timer_add(comp->commit_handler_timer.interval,
+             wins_commit_data->commit_handler_timer = ecore_timer_add(e_comp->commit_handler_timer.interval,
                                                                       _e_hwc_windows_commit_handler_timeout,
                                                                       wins_commit_data);
           }
@@ -922,14 +919,11 @@ _e_hwc_windows_visible_windows_list_get(E_Hwc *hwc)
    Evas_Render_Op render_op;
    Eina_Bool qps_visible;
    Eina_Bool blur_visible = EINA_FALSE;
-   E_Comp *comp;
 
-   if (!(comp = e_comp_get())) return NULL;
-
-   ecore_evas_geometry_get(comp->ee, NULL, NULL, &ee_w, &ee_h);
+   ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &ee_w, &ee_h);
    qps_visible = e_qps_visible_get();
 
-   for (o = evas_object_top_get(comp->evas); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = _e_hwc_windows_client_get_from_object(o, &effect_client);
         if (!ec)
@@ -2914,7 +2908,7 @@ e_hwc_windows_render(E_Hwc *hwc)
         TRACE_DS_BEGIN(MANUAL RENDER);
         target_hwc_window->is_rendering = EINA_TRUE;
         ecore_evas_manual_render(target_hwc_window->ee);
-        if (e_comp_gl_get())
+        if (e_comp->gl)
           {
              egl_error = eglGetError();
              if (egl_error != EGL_SUCCESS)
@@ -3615,7 +3609,8 @@ e_hwc_windows_rendered_window_add(E_Hwc_Window *hwc_window)
    E_Client *ec;
 
    EINA_SAFETY_ON_NULL_RETURN(hwc_window);
-   
+   EINA_SAFETY_ON_NULL_RETURN(e_comp);
+
    if (hwc_window->on_rendered_target) return;
 
    ec = hwc_window->ec;
index 221823264bfd1a51ce2d3bbebc7ca656cb618496..cd21a805c5dfeae5f97cbb067cc0c9d886d79571 100644 (file)
@@ -192,7 +192,7 @@ _e_output_top_visible_ec_get()
    E_Client *ec;
    Evas_Object *o;
 
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
 
@@ -641,11 +641,9 @@ _e_output_visible_client_check(E_Output *output)
    E_Zone *zone = NULL;
    E_Comp_Wl_Client_Data *cdata;
    E_Output *zone_output = NULL;
-   Eina_List *l, *comp_zone_list;
-
-   if (!(comp_zone_list = e_comp_zone_list_get())) return EINA_FALSE;
+   Eina_List *l;
 
-   EINA_LIST_FOREACH(comp_zone_list, l, zone)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
         zone_output = e_output_find(zone->output_id);
         if (!zone_output) continue;
@@ -712,7 +710,6 @@ _e_primary_output_update(E_Output *output)
 
    if (e_output_connected(output))
      {
-        int comp_w = 0, comp_h = 0;
         E_Output_Mode *mode = NULL;
 
         mode = e_output_best_mode_find(output);
@@ -748,8 +745,8 @@ _e_primary_output_update(E_Output *output)
           }
 
         ecore_event_add(E_EVENT_SCREEN_CHANGE, NULL, NULL, NULL);
-        e_comp_size_get(&comp_w, &comp_h);
-        _e_output_client_resize(comp_w, comp_h);
+
+        _e_output_client_resize(e_comp->w, e_comp->h);
      }
    else
      {
@@ -951,15 +948,14 @@ _e_output_update_fps()
    static double lapse = 0.0;
    static int cframes = 0;
    static int flapse = 0;
-   E_Comp *comp = e_comp_get();
 
-   if (comp && comp->calc_fps)
+   if (e_comp->calc_fps)
      {
         double dt;
         double tim = ecore_time_get();
 
-        dt = tim - comp->frametimes[0];
-        comp->frametimes[0] = tim;
+        dt = tim - e_comp->frametimes[0];
+        e_comp->frametimes[0] = tim;
 
         time += dt;
         cframes++;
@@ -971,7 +967,7 @@ _e_output_update_fps()
           }
         else if ((tim - lapse) >= 0.5)
           {
-             comp->fps = (cframes - flapse) / (tim - lapse);
+             e_comp->fps = (cframes - flapse) / (tim - lapse);
              lapse = tim;
              flapse = cframes;
              time = 0.0;
@@ -2934,7 +2930,7 @@ e_output_dpms_set(E_Output *output, E_OUTPUT_DPMS val)
    E_Output_Intercept_Hook_Point hookpoint;
    tdm_output_dpms tval;
    tdm_error error;
-   Eina_List *l, *comp_zone_list;
+   Eina_List *l;
    E_Zone *zone;
    E_Output *primary_output = NULL;
 
@@ -2943,17 +2939,13 @@ e_output_dpms_set(E_Output *output, E_OUTPUT_DPMS val)
    primary_output = e_display_primary_output_get();
    if (primary_output == output)
      {
-        comp_zone_list = e_comp_zone_list_get();
         /* FIXME: The zone controlling should be moved to e_zone */
-        if (comp_zone_list)
+        EINA_LIST_FOREACH(e_comp->zones, l, zone)
           {
-             EINA_LIST_FOREACH(comp_zone_list, l, zone)
-               {
-                  if (val == E_OUTPUT_DPMS_ON)
-                    e_zone_display_state_set(zone, E_ZONE_DISPLAY_STATE_ON);
-                  else if (val == E_OUTPUT_DPMS_OFF)
-                    e_zone_display_state_set(zone, E_ZONE_DISPLAY_STATE_OFF);
-               }
+             if (val == E_OUTPUT_DPMS_ON)
+               e_zone_display_state_set(zone, E_ZONE_DISPLAY_STATE_ON);
+             else if (val == E_OUTPUT_DPMS_OFF)
+               e_zone_display_state_set(zone, E_ZONE_DISPLAY_STATE_OFF);
           }
      }
 
@@ -3310,7 +3302,7 @@ e_output_default_fb_target_get(E_Output *output)
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(output->planes, EINA_FALSE);
 
-   if (e_comp_hwc_ignore_primary())
+   if (e_comp->hwc_ignore_primary)
      {
         /* find lowest zpos graphic type layer */
         EINA_LIST_FOREACH(output->planes, p_l, ep)
index 292729a0a69a804f390284c06bfa7c08cb065df2..5c140bf8599e86d4b80c5f73cd62da0baa944798 100644 (file)
@@ -1,7 +1,6 @@
 #include "e_comp_canvas_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_pointer_intern.h"
 #include "e_output_intern.h"
 #include "e_comp_wl_video_buffer_intern.h"
@@ -90,12 +89,12 @@ _get_comp_wl_buffer(E_Client *ec)
 }
 
 static tbm_surface_queue_h
-_get_tbm_surface_queue(E_Comp *comp)
+_get_tbm_surface_queue(E_Comp *e_comp)
 {
-   if (comp->e_comp_screen)
-     return comp->e_comp_screen->tqueue;
+   E_Comp_Screen *e_comp_screen = e_comp_screen_get();
+   if (!e_comp_screen) return NULL;
 
-   return NULL;
+   return e_comp_screen->tqueue;
 }
 
 static Eina_Bool
@@ -502,7 +501,7 @@ _e_plane_surface_from_client_acquire(E_Plane *plane)
 {
    E_Client *ec = plane->ec;
    E_Comp_Wl_Buffer *buffer = _get_comp_wl_buffer(ec);
-   E_Comp_Wl_Data *wl_cdata = e_comp_wl_get();
+   E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    E_Plane_Renderer *renderer = plane->renderer;
    tbm_surface_h tsurface = NULL;
 
@@ -584,7 +583,6 @@ _e_plane_surface_from_ecore_evas_acquire(E_Plane *plane)
    tbm_surface_h tsurface = NULL;
    tbm_surface_queue_h tqueue = NULL;
    E_Output *output = plane->output;
-   E_Comp *comp;
    char bootmode[32];
    int ret;
 
@@ -593,8 +591,7 @@ _e_plane_surface_from_ecore_evas_acquire(E_Plane *plane)
 
    if (!renderer->tqueue)
      {
-        comp = e_comp_get();
-        if(!comp || !(tqueue = _get_tbm_surface_queue(comp)))
+        if(!(tqueue = _get_tbm_surface_queue(e_comp)))
           {
              WRN("fail to _get_tbm_surface_queue");
              return NULL;
@@ -1893,37 +1890,35 @@ EINTERN Eina_Bool
 e_plane_setup(E_Plane *plane)
 {
    const char *name;
-   E_Plane_Renderer *renderer = NULL;
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
+   E_Plane_Renderer *renderer = NULL;
 
    /* we assume that the primary plane gets a ecore_evas */
    if (!plane->is_fb) return EINA_FALSE;
 
-   name = ecore_evas_engine_name_get(comp->ee);
+   name = ecore_evas_engine_name_get(e_comp->ee);
    EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
 
    if(!strcmp("gl_drm_tbm", name))
      {
-        ecore_evas_manual_render_set(comp->ee, 1);
+        ecore_evas_manual_render_set(e_comp->ee, 1);
      }
    else if(!strcmp("drm_tbm", name))
      {
-        ecore_evas_manual_render_set(comp->ee, 1);
+        ecore_evas_manual_render_set(e_comp->ee, 1);
      }
    else if(!strcmp("gl_tbm", name))
      {
-        ecore_evas_manual_render_set(comp->ee, 1);
+        ecore_evas_manual_render_set(e_comp->ee, 1);
      }
    else if(!strcmp("gl_tbm_ES", name))
      {
-        ecore_evas_manual_render_set(comp->ee, 1);
+        ecore_evas_manual_render_set(e_comp->ee, 1);
      }
    else if(!strcmp("software_tbm", name))
      {
-        ecore_evas_manual_render_set(comp->ee, 1);
+        ecore_evas_manual_render_set(e_comp->ee, 1);
      }
 
    renderer = e_plane_renderer_new(plane);
@@ -2301,9 +2296,7 @@ _e_plane_fb_target_change_check(E_Plane *plane)
 static void
 _e_plane_update_fps(E_Plane *plane)
 {
-   E_Comp *comp = e_comp_get();
-
-   if (comp && comp->calc_fps)
+   if (e_comp->calc_fps)
      {
         double dt;
         double tim = ecore_time_get();
index 5b48e703b3e21c9492681b6fc700bea669ccc9e0..fe498c87fa231dba52cc69e02da197915bb8617f 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_comp_canvas_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_pointer_intern.h"
 #include "e_pixmap_intern.h"
 #include "e_client_intern.h"
@@ -230,7 +229,7 @@ _e_plane_renderer_wayland_tbm_client_queue_get(E_Client *ec)
 {
    struct wayland_tbm_client_queue * cqueue = NULL;
    struct wl_resource *wl_surface = NULL;
-   E_Comp_Wl_Data *wl_cdata = e_comp_wl_get();
+   E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    E_Comp_Wl_Client_Data *cdata;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(wl_cdata, NULL);
@@ -254,7 +253,7 @@ _e_plane_renderer_client_copied_surface_create(E_Plane_Renderer_Client *renderer
    tbm_surface_h new_tsurface = NULL;
    E_Comp_Wl_Buffer *buffer = NULL;
    tbm_surface_info_s src_info, dst_info;
-   E_Comp_Wl_Data *wl_cdata = e_comp_wl_get();
+   E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    int ret = TBM_SURFACE_ERROR_NONE;
    E_Client *ec = renderer_client->ec;
    E_Plane_Renderer *renderer = renderer_client->renderer;
@@ -769,7 +768,7 @@ static uint32_t
 _e_plane_renderer_client_surface_flags_get(E_Plane_Renderer_Client *renderer_client)
 {
    tbm_surface_h tsurface = NULL;
-   E_Comp_Wl_Data *wl_cdata = e_comp_wl_get();
+   E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    E_Client *ec = renderer_client->ec;
    uint32_t flags = 0;
    E_Comp_Wl_Buffer *buffer = NULL;
@@ -847,14 +846,13 @@ _e_plane_renderer_surface_exported_surface_detach_cb(struct wayland_tbm_client_q
    E_Plane *plane = NULL;
    E_Plane_Renderer *renderer = NULL;
    E_Plane_Renderer_Buffer *renderer_buffer = NULL;
-   E_Comp *comp = e_comp_get();
 
-   EINA_SAFETY_ON_NULL_RETURN(comp);
+   EINA_SAFETY_ON_NULL_RETURN(e_comp);
    EINA_SAFETY_ON_NULL_RETURN(e_comp_screen_get());
    EINA_SAFETY_ON_NULL_RETURN(tsurface);
    EINA_SAFETY_ON_NULL_RETURN(data);
 
-   if (!comp->hwc_use_detach) return;
+   if (!e_comp->hwc_use_detach) return;
 
    plane = (E_Plane *)data;
    EINA_SAFETY_ON_NULL_RETURN(plane);
@@ -883,6 +881,8 @@ _e_plane_renderer_surface_exported_surface_destroy_cb(tbm_surface_h tsurface, vo
    E_Plane_Renderer *renderer = NULL;
    E_Plane_Renderer_Buffer *renderer_buffer = NULL;
 
+   EINA_SAFETY_ON_NULL_RETURN(e_comp);
+   EINA_SAFETY_ON_NULL_RETURN(e_comp_screen_get());
    EINA_SAFETY_ON_NULL_RETURN(tsurface);
    EINA_SAFETY_ON_NULL_RETURN(data);
 
@@ -980,7 +980,7 @@ _e_plane_renderer_client_ec_buffer_change_cb(void *data, int type, void *event)
           ELOGF("E_PLANE_RENDERER", "Set    backup buffer   wl_buffer(%p)::buffer_change",
                 ec, _get_wl_buffer(ec));
 
-        if (!e_comp_hwc_use_detach() &&
+        if (!e_comp->hwc_use_detach &&
             renderer_client->state == E_PLANE_RENDERER_CLIENT_STATE_PENDING_DEACTIVATED)
           {
              if (renderer && !_e_plane_renderer_release_exported_renderer_buffer(renderer, renderer_buffer))
@@ -1060,33 +1060,30 @@ _e_plane_renderer_render_flush_post_cb(void *data, Evas *e EINA_UNUSED, void *ev
    Eina_List *render_buffers = NULL;
    E_Comp_Wl_Buffer_Ref *buffer_ref = NULL;
    E_Comp_Wl_Buffer *buffer;
-   Eina_List *l, *comp_render_list;
+   Eina_List *l;
    E_Client *ec;
 
    if (!renderer->render_dequeued_tsurface) return;
-   comp_render_list = e_comp_client_render_list_get();
-   if (comp_render_list)
+
+   EINA_LIST_FOREACH(e_comp->render_list, l, ec)
      {
-        EINA_LIST_FOREACH(comp_render_list, l, ec)
-          {
-             buffer = e_pixmap_ref_resource_get(ec->pixmap);
-             if (!buffer)
-               buffer = _get_comp_wl_buffer(ec);
+        buffer = e_pixmap_ref_resource_get(ec->pixmap);
+        if (!buffer)
+          buffer = _get_comp_wl_buffer(ec);
 
-             if (!buffer) continue;
+        if (!buffer) continue;
 
-             /* if reference buffer created by server, server deadlock is occurred.
-               beacause tbm_surface_internal_unref is called in user_data delete callback.
-               tbm_surface doesn't allow it.
-               */
-             if (!buffer->resource) continue;
+        /* if reference buffer created by server, server deadlock is occurred.
+           beacause tbm_surface_internal_unref is called in user_data delete callback.
+           tbm_surface doesn't allow it.
+         */
+        if (!buffer->resource) continue;
 
-             buffer_ref = E_NEW(E_Comp_Wl_Buffer_Ref, 1);
-             if (!buffer_ref) continue;
+        buffer_ref = E_NEW(E_Comp_Wl_Buffer_Ref, 1);
+        if (!buffer_ref) continue;
 
-             e_comp_wl_buffer_reference(buffer_ref, buffer);
-             render_buffers = eina_list_append(render_buffers, buffer_ref);
-          }     
+        e_comp_wl_buffer_reference(buffer_ref, buffer);
+        render_buffers = eina_list_append(render_buffers, buffer_ref);
      }
 
    tbm_surface_internal_set_user_data(renderer->render_dequeued_tsurface,
@@ -1162,7 +1159,7 @@ e_plane_renderer_new(E_Plane *plane)
 
    if (plane->is_fb)
      {
-        renderer->ee = e_comp_ee_get();
+        renderer->ee = e_comp->ee;
         renderer->evas = ecore_evas_get(renderer->ee);
         renderer->event_fd = eventfd(0, EFD_NONBLOCK);
         renderer->event_hdlr = ecore_main_fd_handler_add(renderer->event_fd, ECORE_FD_READ,
@@ -1333,7 +1330,7 @@ e_plane_renderer_cursor_surface_refresh(E_Plane_Renderer *renderer, E_Client *ec
    w = (output->cursor_available.min_w > tw) ? output->cursor_available.min_w : tw;
    h = (output->cursor_available.min_h > th) ? output->cursor_available.min_h : th;
 
-   if (e_comp_hwc_reuse_cursor_buffer())
+   if (e_comp->hwc_reuse_cursor_buffer)
      {
         if (renderer->cursor_tsurface)
           {
@@ -1660,8 +1657,8 @@ _e_plane_renderer_pending_deactivate_check(E_Plane_Renderer *renderer)
    E_Client *ec = NULL;
    struct wayland_tbm_client_queue *cqueue = NULL;
 
-   if (!e_comp_hwc_sync_mode_change()) return;
-   if (e_comp_hwc_use_detach()) return;
+   if (!e_comp->hwc_sync_mode_change) return;
+   if (e_comp->hwc_use_detach) return;
    if (renderer->state != E_PLANE_RENDERER_STATE_PENDING_DEACTIVATE) return;
 
    if (renderer->pending_deactivate)
@@ -1966,7 +1963,7 @@ e_plane_renderer_reserved_activate(E_Plane_Renderer *renderer, E_Client *ec)
         wayland_tbm_server_client_queue_activate(cqueue, 0, renderer->tqueue_size, renderer->tqueue_width,
                                                  renderer->tqueue_height, 1);
 
-        if (e_comp_hwc_sync_mode_change() && !e_comp_hwc_use_detach())
+        if (e_comp->hwc_sync_mode_change && !e_comp->hwc_use_detach)
           wayland_tbm_server_client_queue_set_dequeue_cb(cqueue, _e_plane_renderer_exported_surface_dequeue_cb, plane);
 
         tsq_err = tbm_surface_queue_notify_reset(renderer->tqueue);
@@ -2088,7 +2085,7 @@ done:
    ELOGF("E_PLANE_RENDERER", "Deactivate Renderer(%p) Plane(%p) ec(%p, %s)",
          ec, renderer, renderer->plane, ec, e_client_util_name_get(ec));
 
-   if (e_comp_hwc_sync_mode_change())
+   if (e_comp->hwc_sync_mode_change)
      {
         if (cqueue)
           {
@@ -2097,7 +2094,7 @@ done:
 
              renderer_client->state = E_PLANE_RENDERER_CLIENT_STATE_PENDING_DEACTIVATED;
 
-             if (e_comp_hwc_use_detach())
+             if (e_comp->hwc_use_detach)
                _e_plane_renderer_exported_surfaces_timer_set(renderer);
           }
         else
@@ -2224,7 +2221,7 @@ EINTERN tbm_surface_h
 e_plane_renderer_client_surface_recieve(E_Plane_Renderer_Client *renderer_client)
 {
    tbm_surface_h tsurface = NULL;
-   E_Comp_Wl_Data *wl_cdata = e_comp_wl_get();
+   E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    E_Client *ec = NULL;
    uint32_t flags = 0;
    E_Comp_Wl_Buffer *buffer = NULL;
index 701ae95936ba1b84b15a7e08f616a7c1b257aee8..0a493df48374fdad7afe3bde922cddf07b0a3691 100644 (file)
@@ -41,9 +41,7 @@ e_scale_update(void)
           {
              if (e_config->scale.inch_correction > 0.0)
                {
-                  int comp_w = 0, comp_h = 0;
-                  e_comp_size_get(&comp_w, &comp_h);
-                  inch = floor(sqrt((comp_w * comp_w) + (comp_h * comp_h)) / BASE_DPI * 10 + 0.5) / 10;
+                  inch = floor(sqrt((e_comp->w * e_comp->w) + (e_comp->h * e_comp->h)) / BASE_DPI * 10 + 0.5) / 10;
 
                   if (inch <= e_config->scale.inch_correction_bound)
                     profile_factor = e_config->scale.profile_factor;
@@ -92,9 +90,7 @@ e_scale_manual_update(int dpi)
      {
         if (e_config->scale.inch_correction > 0.0)
           {
-             int comp_w = 0, comp_h = 0;
-             e_comp_size_get(&comp_w, &comp_h);
-             inch = floor(sqrt((comp_w * comp_w) + (comp_h * comp_h)) / dpi * 10 + 0.5) / 10;
+             inch = floor(sqrt((e_comp->w * e_comp->w) + (e_comp->h * e_comp->h)) / dpi * 10 + 0.5) / 10;
 
              if (inch <= e_config->scale.inch_correction_bound)
                profile_factor = e_config->scale.profile_factor;
index 863d6b54c72101f995d15109ee3ab1ab2b3342ad..5d4ede323679c249c26991d7a2350731c3c405d8 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_video_hwc_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
 #include "e_comp_wl_viewport_intern.h"
 #include "e_output_intern.h"
@@ -1308,12 +1307,11 @@ static void
 _e_video_hwc_input_buffer_valid(E_Video_Hwc *evh, E_Comp_Wl_Buffer *comp_buffer)
 {
    E_Comp_Wl_Video_Buf *vbuf;
-   E_Comp_Wl_Data *comp_wl;
    Eina_List *l;
 
    EINA_LIST_FOREACH(evh->input_buffer_list, l, vbuf)
      {
-        tbm_surface_h tbm_surf = NULL;
+        tbm_surface_h tbm_surf;
         tbm_bo bo;
         uint32_t size = 0, offset = 0, pitch = 0;
 
@@ -1324,9 +1322,7 @@ _e_video_hwc_input_buffer_valid(E_Video_Hwc *evh, E_Comp_Wl_Buffer *comp_buffer)
              return;
           }
 
-        comp_wl = e_comp_wl_get();
-        if (comp_wl)
-          tbm_surf = wayland_tbm_server_get_surface(comp_wl->tbm.server, comp_buffer->resource);
+        tbm_surf = wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server, comp_buffer->resource);
         bo = tbm_surface_internal_get_bo(tbm_surf, 0);
         tbm_surface_internal_get_plane_data(tbm_surf, 0, &size, &offset, &pitch);
 
@@ -1343,13 +1339,9 @@ _e_video_hwc_input_buffer_valid(E_Video_Hwc *evh, E_Comp_Wl_Buffer *comp_buffer)
 static tbm_format
 _e_video_hwc_comp_buffer_tbm_format_get(E_Comp_Wl_Buffer *comp_buffer)
 {
-   E_Comp_Wl_Data *comp_wl;
    tbm_surface_h tbm_surf;
 
-   comp_wl = e_comp_wl_get();
-   if (!comp_wl) return 0;
-
-   tbm_surf = wayland_tbm_server_get_surface(comp_wl->tbm.server, comp_buffer->resource);
+   tbm_surf = wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server, comp_buffer->resource);
    EINA_SAFETY_ON_NULL_RETURN_VAL(tbm_surf, 0);
 
    return tbm_surface_get_format(tbm_surf);
@@ -1358,9 +1350,8 @@ _e_video_hwc_comp_buffer_tbm_format_get(E_Comp_Wl_Buffer *comp_buffer)
 static tbm_surface_h
 _e_video_hwc_client_tbm_surface_get(E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
    E_Comp_Wl_Buffer *comp_buffer;
-   tbm_surface_h tbmsurf = NULL;
+   tbm_surface_h tbmsurf;
 
    comp_buffer = e_pixmap_resource_get(ec->pixmap);
    if (!comp_buffer)
@@ -1369,9 +1360,7 @@ _e_video_hwc_client_tbm_surface_get(E_Client *ec)
         return NULL;
      }
 
-   comp_wl = e_comp_wl_get();
-   if (comp_wl)
-     tbmsurf = wayland_tbm_server_get_surface(comp_wl->tbm.server,
+   tbmsurf = wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server,
                                             comp_buffer->resource);
 
    return tbmsurf;
index 8a5c09fbb1c22170e0c3e3cf09ab985ef4191855..5531a3ad2d997c30634ba1bc17589ff37421ab3a 100644 (file)
@@ -111,14 +111,11 @@ _e_comp_screen_commit_idle_cb(void *data EINA_UNUSED)
 {
    Eina_List *l, *ll;
    E_Output *output = NULL;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) goto end;
 
    if (e_config->comp_canvas_norender.use)
-     evas_norender(comp->evas);
+     evas_norender(e_comp->evas);
 
-   if (comp->canvas_render_delayed) goto end;
+   if (e_comp->canvas_render_delayed) goto end;
 
    EINA_LIST_FOREACH_SAFE(e_display_outputs_get(), l, ll, output)
      {
@@ -194,11 +191,7 @@ end:
 static void
 _e_comp_screen_pointer_renew(void)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
-
-   if ((comp_wl->ptr.num_devices == 0) && comp_wl->ptr.ec && comp_wl->ptr.ec->pointer_enter_sent)
+     if ((e_comp_wl->ptr.num_devices == 0) && e_comp_wl->ptr.ec && e_comp_wl->ptr.ec->pointer_enter_sent)
      {
         if (e_devicemgr->last_device_ptr)
           {
@@ -207,7 +200,7 @@ _e_comp_screen_pointer_renew(void)
              const char *name;
              const char *description;
 
-             list = (Eina_List *)evas_device_list(evas_object_evas_get(comp_wl->ptr.ec->frame), NULL);
+             list = (Eina_List *)evas_device_list(evas_object_evas_get(e_comp_wl->ptr.ec->frame), NULL);
              EINA_LIST_FOREACH(list, l, dev)
                {
                   name = evas_device_name_get(dev);
@@ -223,7 +216,7 @@ _e_comp_screen_pointer_renew(void)
                     }
                }
              if (last_ptr)
-               e_comp_wl_mouse_out_renew(comp_wl->ptr.ec, 0, wl_fixed_to_int(comp_wl->ptr.x), wl_fixed_to_int(comp_wl->ptr.y), NULL, NULL, NULL, ecore_time_get(), EVAS_EVENT_FLAG_NONE, last_ptr, NULL);
+               e_comp_wl_mouse_out_renew(e_comp_wl->ptr.ec, 0, wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), NULL, NULL, NULL, ecore_time_get(), EVAS_EVENT_FLAG_NONE, last_ptr, NULL);
           }
      }
 }
@@ -243,7 +236,7 @@ _e_comp_screen_cb_input_device_del(void *data, int type, void *event)
           {
              e_comp_wl_input_pointer_enabled_set(EINA_FALSE);
              e_pointer_view_set(comp->pointer, NULL, 0, 0);
-             e_pointer_hide(comp->pointer);
+             e_pointer_hide(e_comp->pointer);
 
              _e_comp_screen_pointer_renew();
           }
@@ -268,13 +261,9 @@ e_comp_screen_size_update(E_Comp_Screen *e_comp_screen)
    E_Output *output;
    int sum_w = 0, max_h = 0, output_w, output_h;
    Eina_List *l;
-   E_Comp *comp;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
 
-   comp = e_comp_get();
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
-
    EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
      {
         if (!e_output_connected(output)) continue;
@@ -289,26 +278,26 @@ e_comp_screen_size_update(E_Comp_Screen *e_comp_screen)
    e_comp_screen->w = sum_w;
    e_comp_screen->h = max_h;
 
-   if (comp->ee)
+   if (e_comp->ee)
      {
         /* rotation should be reset because tbm_surface_queue or gbm_surface of
          * ecore_evas is created without rotation
          * and rotation of ecore_evas is reset after it is resized
          */
         if (e_comp_screen->rotation)
-          ecore_evas_rotation_with_resize_set(comp->ee, 0);
+          ecore_evas_rotation_with_resize_set(e_comp->ee, 0);
 
-        ecore_evas_resize(comp->ee, e_comp_screen->w, e_comp_screen->h);
+        ecore_evas_resize(e_comp->ee, e_comp_screen->w, e_comp_screen->h);
 
         if (e_comp_screen->rotation)
-          ecore_evas_rotation_with_resize_set(comp->ee, e_comp_screen->rotation);
+          ecore_evas_rotation_with_resize_set(e_comp->ee, e_comp_screen->rotation);
      }
 
    return EINA_TRUE;
 }
 
 static E_Comp_Screen *
-_e_comp_screen_new(void)
+_e_comp_screen_new(E_Comp *comp)
 {
    E_Comp_Screen *e_comp_screen = NULL;
    int screen_rotation;
@@ -344,7 +333,7 @@ _e_comp_screen_new(void)
    e_comp_screen->num_outputs = e_display_num_outputs_get();
    e_comp_screen->outputs = e_display_outputs_get();
 
-   if (e_comp_hwc_is_configured() && e_comp_conf_hwc_deactive_get())
+   if (e_comp->hwc && e_comp_conf_hwc_deactive_get())
      e_comp_hwc_deactive_set(EINA_TRUE);
 
    /* tbm bufmgr init */
@@ -403,13 +392,13 @@ _e_comp_screen_engine_deinit(void)
 }
 
 static Eina_Bool
-_e_comp_screen_engine_init(E_Comp *comp)
+_e_comp_screen_engine_init(void)
 {
    E_Comp_Screen *e_comp_screen = NULL;
 
    /* e_comp_screen new */
    e_main_ts_begin("\tE_Comp_Screen New");
-   e_comp_screen = _e_comp_screen_new();
+   e_comp_screen = _e_comp_screen_new(e_comp);
    if (!e_comp_screen)
      {
         e_main_ts_end("\tE_Comp_Screen New Failed");
@@ -425,7 +414,7 @@ _e_comp_screen_engine_init(E_Comp *comp)
    e_comp_screen_e_screens_setup(e_comp_screen, -1, -1);
 
    /* update the screen, outputs and planes at the idle enterer of the ecore_loop */
-   ecore_idle_enterer_add(_e_comp_screen_commit_idle_cb, comp);
+   ecore_idle_enterer_add(_e_comp_screen_commit_idle_cb, e_comp);
 
    return EINA_TRUE;
 }
@@ -459,8 +448,6 @@ e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh)
    int i = 0, right_x = 0;
    int x, y, w, h;
 
-   EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
-
    primary_output = e_display_primary_output_get();
    /* No pirmary output means that there is no output at the system */
    if (!primary_output) goto out;
@@ -524,9 +511,9 @@ out:
    else
      {
         if (e_comp_screen->rotation % 180)
-          ecore_evas_geometry_get(e_comp_ee_get(), NULL, NULL, &screen->h, &screen->w);
+          ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &screen->h, &screen->w);
         else
-          ecore_evas_geometry_get(e_comp_ee_get(), NULL, NULL, &screen->w, &screen->h);
+          ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &screen->w, &screen->h);
      }
    e_screens = eina_list_append(e_screens, screen);
 
@@ -563,11 +550,11 @@ e_comp_screen_init()
    E_Comp_Screen *e_comp_screen;
    int w, h, ptr_x = 0, ptr_y = 0;
 
-   comp = e_comp_get();
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
+   if (!(comp = e_comp))
+     EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
 
    e_main_ts_begin("\tE_Comp_Screen_Engine Init");
-   if (!_e_comp_screen_engine_init(comp))
+   if (!_e_comp_screen_engine_init())
      {
         e_main_ts_end("\tE_Comp_Screen_Engine Init Failed");
         ERR("Could not initialize the ecore_evas engine.");
@@ -576,7 +563,7 @@ e_comp_screen_init()
    e_main_ts_end("\tE_Comp_Screen_Engine Init Done");
 
    e_main_ts_begin("\tE_Input Init");
-   if (!e_input_init(comp->ee))
+   if (!e_input_init(e_comp->ee))
      {
         e_main_ts_end("\tE_Input Init Failed");
         ERR("Could not initialize the e_input.");
@@ -593,7 +580,7 @@ e_comp_screen_init()
    e_main_ts_end("\tE_Server Init Done");
 
    /* get the current screen geometry */
-   ecore_evas_geometry_get(comp->ee, NULL, NULL, &w, &h);
+   ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &w, &h);
 
    /* canvas */
    e_main_ts_begin("\tE_Comp_Canvas Init");
@@ -607,10 +594,10 @@ e_comp_screen_init()
 
    /* pointer */
    e_input_device_pointer_xy_get(NULL, &ptr_x, &ptr_y);
-   comp->wl_comp_data->ptr.x = wl_fixed_from_int(ptr_x);
-   comp->wl_comp_data->ptr.y = wl_fixed_from_int(ptr_y);
+   e_comp_wl->ptr.x = wl_fixed_from_int(ptr_x);
+   e_comp_wl->ptr.y = wl_fixed_from_int(ptr_y);
 
-   evas_event_feed_mouse_in(comp->evas, 0, NULL);
+   evas_event_feed_mouse_in(e_comp->evas, 0, NULL);
 
    e_main_ts_begin("\tE_Pointer New");
    if ((comp->pointer = e_pointer_canvas_new(comp->ee, EINA_TRUE)))
@@ -701,13 +688,9 @@ _e_comp_screen_rotation_set(E_Comp_Screen *e_comp_screen, int screen_rotation,
 {
    E_Output *primary_output = NULL;
    E_Input_Device *dev;
-   E_Comp* comp;
    const Eina_List *l;
    int w, h;
 
-   if (!(comp = e_comp_get()))
-     return EINA_FALSE;;
-
    primary_output = e_display_primary_output_get();
    if (!primary_output)
      return EINA_FALSE;
@@ -719,8 +702,8 @@ _e_comp_screen_rotation_set(E_Comp_Screen *e_comp_screen, int screen_rotation,
    if (setter)
       setter(e_comp_screen, data);
 
-   ecore_evas_rotation_with_resize_set(comp->ee, e_comp_screen->rotation);
-   ecore_evas_geometry_get(comp->ee, NULL, NULL, &w, &h);
+   ecore_evas_rotation_with_resize_set(e_comp->ee, e_comp_screen->rotation);
+   ecore_evas_geometry_get(e_comp->ee, NULL, NULL, &w, &h);
 
    /* rendering forcely to prepare HWC */
    e_comp_render_queue();
index d9b1a30ee54e666e9d703ad564bf8e429101b729..6aad4aa79c54b8471afbd640780232e53fd6c65a 100644 (file)
@@ -1165,16 +1165,12 @@ _e_main_desk_save(void)
    const Eina_List *l;
    char env[1024], name[1024];
    E_Zone *zone;
-   Eina_List *zone_list = e_comp_zone_list_get();
 
-   if (zone_list)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
-        EINA_LIST_FOREACH(zone_list, l, zone)
-          {
-             snprintf(name, sizeof(name), "DESK_%d_%d", 0, zone->num);
-             snprintf(env, sizeof(env), "%d,%d", zone->desk_x_current, zone->desk_y_current);
-             e_util_env_set(name, env);
-          }
+        snprintf(name, sizeof(name), "DESK_%d_%d", 0, zone->num);
+        snprintf(env, sizeof(env), "%d,%d", zone->desk_x_current, zone->desk_y_current);
+        e_util_env_set(name, env);
      }
 }
 
index b6efe3c75b19f24e16b67df76c976e0b622a4e89..5bd2797303132c986c451ddcc0ab8c9c2842188d 100644 (file)
@@ -1,6 +1,5 @@
 #include "e_devicemgr_intern.h"
 #include "e_server_intern.h"
-#include "e_comp_intern.h"
 
 #include <tizen-extension-server-protocol.h>
 
@@ -117,9 +116,8 @@ e_devicemgr_init(void)
 {
    E_Devicemgr_Config_Data *dconfig = NULL;
    Eina_Bool res = EINA_FALSE;
-   E_Comp *comp = e_comp_get();
 
-   EINA_SAFETY_ON_NULL_GOTO(comp, failed);
+   EINA_SAFETY_ON_NULL_GOTO(e_comp, failed);
 
    _devicemgr_log_dom = eina_log_domain_register("e-devicemgr", EINA_COLOR_BLUE);
    EINA_SAFETY_ON_FALSE_GOTO(_devicemgr_log_dom >= 0, failed);
index f4f5937b5b27bb8d02c7338feb48d701a28c6112..53fd7d5666bc5022c67ca9dc0bc92b1b85c79167 100644 (file)
@@ -40,7 +40,7 @@ _e_devicemgr_input_pointer_warp(int x, int y)
         // update evas' mouse position to the requested warp position
         // This generates mouse out/in to correct client.
         DMWRN("Pointer Constraint activated. feed_mouse_move");
-        evas_event_feed_mouse_move(e_comp_evas_get(), x, y, 0, NULL);
+        evas_event_feed_mouse_move(e_comp->evas, x, y, 0, NULL);
      }
 
    if (e_comp_wl_input_pointer_constraint_activated_get())
@@ -62,7 +62,6 @@ e_devicemgr_input_pointer_warp(struct wl_client *client, struct wl_resource *res
    E_Map *map;
    int new_x, new_y, ret;
    int i, min_x, min_y, max_x, max_y, tmp_x, tmp_y, map_x = 0, map_y = 0;
-   E_Comp_Wl_Data *comp_wl;
 
    if (!(ec = e_client_from_surface_resource(surface)) || !ec->visible)
      {
@@ -70,16 +69,13 @@ e_devicemgr_input_pointer_warp(struct wl_client *client, struct wl_resource *res
         return TIZEN_INPUT_DEVICE_MANAGER_ERROR_INVALID_SURFACE;
      }
 
-   if (!(comp_wl = e_comp_wl_get()))
-     return TIZEN_INPUT_DEVICE_MANAGER_ERROR_INVALID_SURFACE;
-
-   if (ec != comp_wl->ptr.ec)
+   if (ec != e_comp_wl->ptr.ec)
      {
         DMERR("Pointer is not on the given surface  !\n");
         return TIZEN_INPUT_DEVICE_MANAGER_ERROR_INVALID_SURFACE;
      }
 
-   if ((!e_config->show_cursor) || (!comp_wl->ptr.enabled))
+   if ((!e_config->show_cursor) || (!e_comp_wl->ptr.enabled))
      {
         DMERR("Pointer is not available");
         if (!e_comp_wl_input_pointer_constraint_activated_get())
@@ -211,9 +207,9 @@ _e_devicemgr_input_mouse_button_remap(Ecore_Event_Mouse_Button *ev, Eina_Bool pr
    ev_key->timestamp = e_util_timestamp_get();
    ev_key->same_screen = 1;
 
-   ev_key->window = e_comp_ee_win_get();
-   ev_key->event_window = ev_key->window;
-   ev_key->root_window = ev_key->window;
+   ev_key->window = e_comp->ee_win;
+   ev_key->event_window = e_comp->ee_win;
+   ev_key->root_window = e_comp->ee_win;
    ev_key->keycode = e_devicemgr->dconfig->conf->input.back_keycode;
    ev_key->data = key_data;
 
index cf1cf0a0d8596e6502840ea40cd313750b021864..ffd94cd753f1f0bd7a063b146ba1013f51490bac 100644 (file)
@@ -126,9 +126,9 @@ e_devicemgr_inputgen_key_event_add(const char *key, Eina_Bool pressed, char *ide
    e->compose = eina_stringshare_add(key);
    e->string = e->compose;
 
-   e->window = e_comp_ee_win_get();
-   e->event_window = e->window;
-   e->root_window = e->window;
+   e->window = e_comp->ee_win;
+   e->event_window = e_comp->ee_win;
+   e->root_window = e_comp->ee_win;
    e->timestamp = e_util_timestamp_get();
    e->same_screen = 1;
    e->keycode = keycode;
@@ -185,9 +185,9 @@ _e_devicemgr_inputgen_mouse_button_event(Eina_Bool state, int x, int y, int butt
    e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
    EINA_SAFETY_ON_NULL_RETURN_VAL(e, TIZEN_INPUT_DEVICE_MANAGER_ERROR_NO_SYSTEM_RESOURCES);
 
-   e->window = e_comp_ee_win_get();
-   e->event_window = e->window;
-   e->root_window = e->window;
+   e->window = e_comp->ee_win;
+   e->event_window = e_comp->ee_win;
+   e->root_window = e_comp->ee_win;
    e->timestamp = e_util_timestamp_get();
    e->same_screen = 1;
 
@@ -242,9 +242,9 @@ _e_devicemgr_inputgen_mouse_move_event(int x, int y, char *identifier)
    e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
    if (!e) return TIZEN_INPUT_DEVICE_MANAGER_ERROR_NO_SYSTEM_RESOURCES;
 
-   e->window = e_comp_ee_win_get();
-   e->event_window = e->window;
-   e->root_window = e->window;
+   e->window = e_comp->ee_win;
+   e->event_window = e_comp->ee_win;
+   e->root_window = e_comp->ee_win;
    e->timestamp = e_util_timestamp_get();
    e->same_screen = 1;
 
@@ -295,9 +295,9 @@ _e_devicemgr_inputgen_mouse_wheel_event(unsigned int type, int value, E_Devicemg
    e = calloc(1, sizeof(Ecore_Event_Mouse_Wheel));
    if (!e) return TIZEN_INPUT_DEVICE_MANAGER_ERROR_NO_SYSTEM_RESOURCES;
 
-   e->window = e_comp_ee_win_get();
-   e->event_window = e->window;
-   e->root_window = e->window;
+   e->window = e_comp->ee_win;
+   e->event_window = e_comp->ee_win;
+   e->root_window = e_comp->ee_win;
    e->timestamp = e_util_timestamp_get();
    e->same_screen = 1;
 
@@ -411,9 +411,9 @@ _e_devicemgr_inputgen_touch_event(uint32_t type, uint32_t x, uint32_t y, uint32_
    e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
    EINA_SAFETY_ON_NULL_RETURN_VAL(e, TIZEN_INPUT_DEVICE_MANAGER_ERROR_NO_SYSTEM_RESOURCES);
 
-   e->window = e_comp_ee_win_get();
-   e->event_window = e->window;
-   e->root_window = e->window;
+   e->window = e_comp->ee_win;
+   e->event_window = e_comp->ee_win;
+   e->root_window = e_comp->ee_win;
    e->timestamp = e_util_timestamp_get();
    e->same_screen = 1;
 
@@ -475,9 +475,9 @@ _e_devicemgr_inputgen_touch_update_event(uint32_t x, uint32_t y, uint32_t finger
    e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
    EINA_SAFETY_ON_NULL_RETURN_VAL(e, TIZEN_INPUT_DEVICE_MANAGER_ERROR_NO_SYSTEM_RESOURCES);
 
-   e->window = e_comp_ee_win_get();
-   e->event_window = e->window;
-   e->root_window = e->window;
+   e->window = e_comp->ee_win;
+   e->event_window = e_comp->ee_win;
+   e->root_window = e_comp->ee_win;
    e->timestamp = e_util_timestamp_get();
    e->same_screen = 1;
 
index 81b38b84b19d41f91dbc5b740bf9dbd7fdb7f29a..72e248dedde9521c9b5ed091e83ad2fdd621b449 100644 (file)
@@ -4,7 +4,6 @@
 #include "e_input_backend_intern.h"
 #include "e_comp_wl_input_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_info_server_intern.h"
 #include "e_comp_input_intern.h"
 #include "e_keyrouter_wl_intern.h"
@@ -642,7 +641,7 @@ e_keyrouter_init(void)
 
    TRACE_INPUT_BEGIN(e_keyrouter_init);
 
-   EINA_SAFETY_ON_NULL_GOTO(e_comp_get(), err);
+   EINA_SAFETY_ON_NULL_GOTO(e_comp, err);
 
    _keyrouter_log_dom = eina_log_domain_register("e-keyrouter", EINA_COLOR_RED);
    EINA_SAFETY_ON_FALSE_GOTO(_keyrouter_log_dom >= 0, err);
index 1d72ab7a1d6d3c71c8a13322b04e219410cd5496..a23d61c2870907d950b2b43157c297d994e5f130 100644 (file)
@@ -2,7 +2,6 @@
 #include "e_input_intern.h"
 #include "e_comp_wl_input_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_utils_intern.h"
 #include "e_screensaver_intern.h"
 #include "e_config_intern.h"
@@ -141,9 +140,9 @@ _e_keyrouter_key_create(char *keyname)
    ev_key->timestamp = e_util_timestamp_get();
    ev_key->same_screen = 1;
 
-   ev_key->window = e_comp_ee_win_get();
-   ev_key->event_window = ev_key->window;
-   ev_key->root_window = ev_key->window;
+   ev_key->window = e_comp->ee_win;
+   ev_key->event_window = e_comp->ee_win;
+   ev_key->root_window = e_comp->ee_win;
    ev_key->keycode = keycode;
    ev_key->data = key_data;
 
@@ -999,11 +998,10 @@ e_keyrouter_util_cmd_get_from_pid(int pid)
 {
    Eina_List *l;
    E_Comp_Connected_Client_Info *cdata;
-   E_Comp *comp = e_comp_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
 
-   EINA_LIST_FOREACH(comp->connected_clients, l, cdata)
+   EINA_LIST_FOREACH(e_comp->connected_clients, l, cdata)
      {
         if (cdata->pid == pid) return strdup(cdata->name);
      }
index b9197cf034523997fa3eb0fb871225d9f1f87761..c005a8e9da823d3d46cd0e63cc3eb967b3fe702a 100644 (file)
@@ -33,7 +33,7 @@ e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g,
 {
    if (!punch_obj)
      {
-        punch_obj = evas_object_rectangle_add(e_comp_evas_get());
+        punch_obj = evas_object_rectangle_add(e_comp->evas);
         evas_object_layer_set(punch_obj, EVAS_LAYER_MAX);
         evas_object_render_op_set(punch_obj, EVAS_RENDER_COPY);
      }
@@ -41,7 +41,7 @@ e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g,
    evas_object_color_set(punch_obj, r, g, b, a);
 
    if (w == 0 || h == 0)
-     evas_output_size_get(e_comp_evas_get(), &w, &h);
+     evas_output_size_get(e_comp->evas, &w, &h);
 
    evas_object_move(punch_obj, x, y);
    evas_object_resize(punch_obj, w, h);
index a9d3b39c28ff75bdec405688ed03874af2814c6b..89b3e6c3b67d575291eca7e14b3beb2edd0f1c3b 100644 (file)
@@ -1,6 +1,5 @@
 #include "e_blender_intern.h"
 #include "e_client_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_comp_object_intern.h"
 #include "e_view_client_intern.h"
 #include "e_view_intern.h"
@@ -201,16 +200,16 @@ EINTERN Eina_Bool
 e_blender_init(void)
 {
    E_Blender *blender;
-   struct wl_display *wl_disp = e_comp_wl_display_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(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 (_blender) return EINA_TRUE;
 
    blender = E_NEW(E_Blender, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(blender, EINA_FALSE);
 
-   blender->tizen_blender = ds_tizen_blender_create(wl_disp);
+   blender->tizen_blender = ds_tizen_blender_create(e_comp_wl->wl.disp);
    EINA_SAFETY_ON_NULL_GOTO(blender->tizen_blender, fail);
 
    blender->destroy_listener.notify = _e_blender_cb_destroy;
index ad90f2b1c58ffcee145c1b07c7a88a0fdad9cc0e..2bf19338317b5f0c235ebdcf3ea621e4c018ba0a 100644 (file)
@@ -1,7 +1,6 @@
 #include "e.h"
 #include "e_blur_intern.h"
 #include "e_blur_video_capture_intern.h"
-#include "e_comp_wl_intern.h"
 #include <pixman.h>
 #include <libds-tizen/blur.h>
 
@@ -481,7 +480,7 @@ _e_blur_cb_new_rectangle(struct wl_listener *listener, void *data)
    EINA_SAFETY_ON_NULL_RETURN(blur);
    EINA_SAFETY_ON_NULL_RETURN(blur->ec);
 
-   obj = evas_object_image_filled_add(e_comp_evas_get());
+   obj = evas_object_image_filled_add(e_comp->evas);
    EINA_SAFETY_ON_NULL_RETURN(obj);
 
    blur_rectangle = E_NEW(E_Blur_Rectangle, 1);
@@ -588,16 +587,16 @@ e_blur_manager_init(void)
 {
    E_Blur_Manager *blur_manager;
    E_Comp_Config *conf = e_comp_config_get();
-   struct wl_display *wl_disp = e_comp_wl_display_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(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 (_blur_manager) return EINA_TRUE;
 
    blur_manager = E_NEW(E_Blur_Manager, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(blur_manager, EINA_FALSE);
 
-   blur_manager->tizen_blur_manager = ds_tizen_blur_manager_create(wl_disp);
+   blur_manager->tizen_blur_manager = ds_tizen_blur_manager_create(e_comp_wl->wl.disp);
    EINA_SAFETY_ON_NULL_GOTO(blur_manager->tizen_blur_manager, fail);
 
    blur_manager->listener.destroy.notify = _e_blur_manager_cb_destroy;
index 9f1179e7024890c5d794bbfd9e447e1244adbc51..508fe52d66953e0c8f11c876569e2f508222a309 100644 (file)
@@ -131,7 +131,7 @@ _e_blur_video_capture_source_object_init(void)
 
    if (video_capture->source_obj) return EINA_TRUE;
 
-   video_capture->source_obj = evas_object_image_filled_add(e_comp_evas_get());
+   video_capture->source_obj = evas_object_image_filled_add(e_comp->evas);
    EINA_SAFETY_ON_NULL_RETURN_VAL(video_capture->source_obj, EINA_FALSE);
 
    evas_object_name_set(video_capture->source_obj, "blur_video_capture");
@@ -270,7 +270,6 @@ _e_blur_video_capture_object_get(E_Blur_Video_Capture_Client *client, E_Blur_Rec
    unsigned int *pixels;
    char program[256];
    int rx = 0, ry = 0;
-   int comp_w = 0, comp_h = 0;
 
    if (!blur_rectangle) return NULL;
 
@@ -286,7 +285,7 @@ _e_blur_video_capture_object_get(E_Blur_Video_Capture_Client *client, E_Blur_Rec
    object = E_NEW(E_Blur_Video_Capture_Object, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(object, NULL);
 
-   object->blur_clip_obj = evas_object_image_filled_add(e_comp_evas_get());
+   object->blur_clip_obj = evas_object_image_filled_add(e_comp->evas);
    EINA_SAFETY_ON_NULL_GOTO(object->blur_clip_obj, fail);
    evas_object_image_size_set(object->blur_clip_obj, 1, 1);
    pixels = evas_object_image_data_get(object->blur_clip_obj, EINA_TRUE);
@@ -303,12 +302,12 @@ _e_blur_video_capture_object_get(E_Blur_Video_Capture_Client *client, E_Blur_Rec
    evas_object_name_set(object->blur_clip_obj, "blur_video_capture_blur_clip_obj");
    evas_object_pass_events_set(object->blur_clip_obj, EINA_TRUE);
 
-   object->source_clip_obj = evas_object_rectangle_add(e_comp_evas_get());
+   object->source_clip_obj = evas_object_rectangle_add(e_comp->evas);
    EINA_SAFETY_ON_NULL_GOTO(object->source_clip_obj, fail);
    evas_object_name_set(object->source_clip_obj, "blur_video_capture_source_clip_obj");
    evas_object_pass_events_set(object->source_clip_obj, EINA_TRUE);
 
-   object->source_obj = evas_object_image_filled_add(e_comp_evas_get());
+   object->source_obj = evas_object_image_filled_add(e_comp->evas);
    EINA_SAFETY_ON_NULL_GOTO(object->source_obj, fail);
    evas_object_name_set(object->source_obj, "blur_video_capture_source_obj");
    evas_object_pass_events_set(object->source_obj, EINA_TRUE);
@@ -346,8 +345,7 @@ _e_blur_video_capture_object_get(E_Blur_Video_Capture_Client *client, E_Blur_Rec
    e_client_geometry_get(client->ec, &x, &y, &w, &h);
    evas_object_geometry_set(object->source_clip_obj, x, y, w, h);
 
-   e_comp_size_get(&comp_w, &comp_h);
-   evas_object_geometry_set(object->source_obj, 0, 0, comp_w, comp_h);
+   evas_object_geometry_set(object->source_obj, 0, 0, e_comp->w, e_comp->h);
 
    evas_object_clip_set(object->source_obj, object->source_clip_obj);
    evas_object_clip_set(object->source_clip_obj, object->blur_clip_obj);
@@ -461,7 +459,6 @@ _e_blur_video_capture_thread_run_notify_cb(void *data, Ecore_Thread *thread, voi
    E_Blur_Video_Capture_Client *client;
    E_Blur_Video_Capture_Object *object;
    Eina_List *l, *l2;
-   int comp_w = 0, comp_h = 0;
 
    if (!tbm_surface_queue_can_acquire(video_capture->tqueue, 0)) return;
 
@@ -482,8 +479,7 @@ _e_blur_video_capture_thread_run_notify_cb(void *data, Ecore_Thread *thread, voi
    evas_object_image_native_surface_set(video_capture->source_obj, &ns);
    evas_object_image_data_update_add(video_capture->source_obj, 0, 0,
                                      video_capture->width, video_capture->height);
-   e_comp_size_get(&comp_w, &comp_h);
-   evas_object_geometry_set(video_capture->source_obj, -comp_w, -comp_h, comp_w, comp_h);
+   evas_object_geometry_set(video_capture->source_obj, -e_comp->w, -e_comp->h, e_comp->w, e_comp->h);
    BLUR_VC_TRACE("Blur Video Capture Source Update End", NULL);
 
    if (!_e_blur_video_capture_source_object_visible_get())
index da29b0d4fb2d1cf24f68ce7b373e2cd1a3270ab5..a9a320a77a29caf61ef5eb757ca25a6b47d78aa0 100644 (file)
@@ -80,7 +80,7 @@ struct _E_Comp_Data
    struct wl_listener client_created;
 };
 
-static Eina_Bool _e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec, E_Comp_Wl_Data *comp_wl);
+static Eina_Bool _e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec);
 static void      _e_comp_wl_surface_state_serial_update(E_Client *ec, E_Comp_Wl_Surface_State *state);
 
 /* local variables */
@@ -262,8 +262,6 @@ static void
 _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
 {
    int w, h;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (!comp_wl) return;
 
    if (send_size)
      {
@@ -278,7 +276,7 @@ _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges, Eina_Bool send_size)
         w = h = -1;
      }
 
-   e_client_shell_configure_send(ec, edges * comp_wl->resize.edges, w, h);
+   e_client_shell_configure_send(ec, edges * e_comp_wl->resize.edges, w, h);
 }
 
 static void
@@ -289,16 +287,14 @@ _e_comp_wl_focus_check(void)
    if (stopping) return;
    ec = e_client_focused_get();
    if (!ec)
-     e_grabinput_focus(e_comp_ee_win_get(), E_FOCUS_METHOD_PASSIVE);
+     e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
 }
 
 static Eina_Bool
-_e_comp_wl_cb_read(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
+_e_comp_wl_cb_read(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
 {
-   E_Comp_Wl_Data *comp_wl = data;
    /* dispatch pending wayland events */
-   if (comp_wl)
-     wl_event_loop_dispatch(comp_wl->wl.loop, 0);
+   wl_event_loop_dispatch(e_comp_wl->wl.loop, 0);
 
    return ECORE_CALLBACK_RENEW;
 }
@@ -306,8 +302,7 @@ _e_comp_wl_cb_read(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
 void
 e_comp_wl_display_flush()
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (comp_wl && comp_wl->wl.disp)
+   if (e_comp_wl && e_comp_wl->wl.disp)
      {
         if (e_config->key_input_ttrace_enable)
           {
@@ -316,7 +311,7 @@ e_comp_wl_display_flush()
           }
 
         e_input_main_thread_connection_lock(&connection_mutex);
-        wl_display_flush_clients(comp_wl->wl.disp);
+        wl_display_flush_clients(e_comp_wl->wl.disp);
         e_input_main_thread_connection_unlock(&connection_mutex);
 
         if (e_config->key_input_ttrace_enable)
@@ -331,9 +326,7 @@ void
 e_comp_wl_focused_client_flush()
 {
    E_Client *focused_ec;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!(comp_wl && comp_wl->wl.disp)) return;
+   if (!(e_comp_wl && e_comp_wl->wl.disp)) return;
 
    e_input_thread_boost_lock(&connection_mutex);
    focused_ec = e_client_focused_get();
@@ -356,16 +349,13 @@ e_comp_wl_focused_client_flush()
 }
 
 static void
-_e_comp_wl_cb_prepare(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
+_e_comp_wl_cb_prepare(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
 {
    double gap_time;
-   E_Comp_Wl_Data *comp_wl = data;
-
-   if (!comp_wl) return;
 
-   if (comp_wl->idle_exiter_timestamp > 0.0)
+   if (e_comp_wl->idle_exiter_timestamp > 0.0)
      {
-        gap_time = (ecore_time_get() * 1000) - comp_wl->idle_exiter_timestamp;
+        gap_time = (ecore_time_get() * 1000) - e_comp_wl->idle_exiter_timestamp;
         if (gap_time > E_COM_WL_PREPARE_GAP_LOG_TIME)
           {
              ELOGF("E_COMP", "prepare gap time: %lfms",
@@ -373,14 +363,14 @@ _e_comp_wl_cb_prepare(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
           }
      }
 
-   comp_wl->idle_exiter_timestamp = 0.0;
+   e_comp_wl->idle_exiter_timestamp = 0.0;
 
-   wl_event_loop_dispatch_idle(comp_wl->wl.loop);
+   wl_event_loop_dispatch_idle(e_comp_wl->wl.loop);
 
    /* flush pending client events */
    e_comp_wl_display_flush();
 
-   TRACE_DS_ASYNC_END((intptr_t)&comp_wl->idle_exiter_timestamp,
+   TRACE_DS_ASYNC_END((intptr_t)&e_comp_wl->idle_exiter_timestamp,
                       IDLE_EXITER~CB_PREPARE);
 
    // _e_comp_wl_cb_prepare() function is called before idle state in ecore_main_loop.
@@ -391,13 +381,9 @@ _e_comp_wl_cb_prepare(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
 static void
 _e_comp_wl_cb_awake(void *data)
 {
-   E_Comp_Wl_Data *comp_wl = data;
-
-   if (!comp_wl) return;
+   e_comp_wl->idle_exiter_timestamp = ecore_time_get() * 1000;
 
-   comp_wl->idle_exiter_timestamp = ecore_time_get() * 1000;
-
-   TRACE_DS_ASYNC_BEGIN((intptr_t)&comp_wl->idle_exiter_timestamp,
+   TRACE_DS_ASYNC_BEGIN((intptr_t)&e_comp_wl->idle_exiter_timestamp,
                         IDLE_EXITER~CB_PREPARE);
 
    // _e_comp_wl_cb_awake() function is called after idle state in ecore_main_loop.
@@ -755,11 +741,9 @@ _e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN
 {
    E_Client *ec;
    E_Client *topmost;
-   E_Comp_Wl_Data *comp_wl;
 
    if (!(ec = data)) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    /* Uncommonly some clients's final buffer can be skipped if the client
     * requests unmap of its surface right after wl_surface@commit.
@@ -773,7 +757,7 @@ _e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN
    if (topmost == ec && (ec->comp_data->sub.list || ec->comp_data->sub.below_list))
      e_comp_wl_subsurface_hide(ec);
 
-   wl_signal_emit(&comp_wl->ptr_constraints.surface_unmap_signal, ec);
+   wl_signal_emit(&e_comp_wl->ptr_constraints.surface_unmap_signal, ec);
 }
 
 static void
@@ -819,18 +803,17 @@ _e_comp_wl_send_touch_cancel(E_Client *ec)
    Eina_List *l;
    struct wl_resource *res;
    struct wl_client *wc;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
    if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+
+   if (!surface) return;
    if ((ec->ignored) && (!ec->remote_surface.provider)) return;
 
    wc = wl_resource_get_client(surface);
 
-   EINA_LIST_FOREACH(comp_wl->touch.resources, l, res)
+   EINA_LIST_FOREACH(e_comp->wl_comp_data->touch.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
         if (!e_comp_wl_input_touch_check(res)) continue;
@@ -842,13 +825,13 @@ _e_comp_wl_send_touch_cancel(E_Client *ec)
 }
 
 static void
-_e_comp_wl_touch_cancel(E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_touch_cancel(void)
 {
    E_Client *ec;
 
-   ec = comp_wl->ptr.ec ? comp_wl->ptr.ec : comp_wl->touch.faked_ec;
+   ec = e_comp_wl->ptr.ec ? e_comp_wl->ptr.ec : e_comp_wl->touch.faked_ec;
    if (!ec) return;
-   if (!comp_wl->touch.pressed) return;
+   if (!e_comp_wl->touch.pressed) return;
 
    _e_comp_wl_send_touch_cancel(ec);
 }
@@ -931,7 +914,7 @@ _e_comp_wl_device_client_last_device_set(E_Client *ec, Ecore_Device_Class dev_cl
 }
 
 static void
-_e_comp_wl_device_send_event_device(E_Client *ec, E_Comp_Wl_Data *comp_wl, Evas_Device *dev, uint32_t timestamp)
+_e_comp_wl_device_send_event_device(E_Client *ec, Evas_Device *dev, uint32_t timestamp)
 {
    E_Devicemgr_Input_Device *last_device, *ec_last_device, *input_dev;
    struct wl_resource *dev_res;
@@ -940,23 +923,23 @@ _e_comp_wl_device_send_event_device(E_Client *ec, E_Comp_Wl_Data *comp_wl, Evas_
    struct wl_client *wc;
    uint32_t serial;
    Eina_List *l, *ll;
-   struct wl_resource *surface;
 
    EINA_SAFETY_ON_NULL_RETURN(dev);
 
    if (!ec) return;
-   if (ec->cur_mouse_action || comp_wl->drag)
+   if (ec->cur_mouse_action || e_comp_wl->drag)
      return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if ((ec->ignored) && (!ec->remote_surface.provider)) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    dev_class = (Ecore_Device_Class)evas_device_class_get(dev);
    dev_name = evas_device_description_get(dev);
    last_device = _e_comp_wl_device_last_device_get(dev_class);
    ec_last_device = _e_comp_wl_device_client_last_device_get(ec, dev_class);
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wc = wl_resource_get_client(surface);
    g_rec_mutex_lock(&e_devicemgr->device_list_mutex);
    EINA_LIST_FOREACH(e_devicemgr->device_list, l, input_dev)
@@ -978,21 +961,23 @@ _e_comp_wl_device_send_event_device(E_Client *ec, E_Comp_Wl_Data *comp_wl, Evas_
 }
 
 static void
-_e_comp_wl_device_send_last_event_device(E_Client *ec, E_Comp_Wl_Data *comp_wl, Ecore_Device_Class dev_class, uint32_t timestamp)
+_e_comp_wl_device_send_last_event_device(E_Client *ec, Ecore_Device_Class dev_class, uint32_t timestamp)
 {
    E_Devicemgr_Input_Device *last_device;
    struct wl_resource *dev_res;
    struct wl_client *wc;
    uint32_t serial;
    Eina_List *l;
-   struct wl_resource *surface;
 
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
-   if (!(last_device = _e_comp_wl_device_last_device_get(dev_class))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
+
+   last_device = _e_comp_wl_device_last_device_get(dev_class);
+   if (!last_device) return;
 
    _e_comp_wl_device_client_last_device_set(ec, dev_class, last_device);
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wc = wl_resource_get_client(surface);
    EINA_LIST_FOREACH(last_device->resources, l, dev_res)
      {
@@ -1058,7 +1043,7 @@ _e_comp_wl_send_event_e_device(struct wl_client *wc, uint32_t timestamp, E_Devic
 }
 
 static void
-_e_comp_wl_cursor_reload(E_Comp_Wl_Data *comp_wl, E_Client *ec)
+_e_comp_wl_cursor_reload(E_Client *ec)
 {
    struct wl_resource *res;
    struct wl_client *wc;
@@ -1066,20 +1051,19 @@ _e_comp_wl_cursor_reload(E_Comp_Wl_Data *comp_wl, E_Client *ec)
    E_Map *map;
    uint32_t serial;
    int cx, cy, px, py;
-   struct wl_resource *surface;
-   E_Pointer *comp_pointer = e_comp_pointer_get();
 
-   if (comp_pointer && comp_pointer->view_client &&
-       !e_view_client_visible_get(comp_pointer->view_client))
-     e_pointer_view_set(comp_pointer, NULL, 0, 0);
+   if (e_comp->pointer && e_comp->pointer->view_client &&
+       !e_view_client_visible_get(e_comp->pointer->view_client))
+     e_pointer_view_set(e_comp->pointer, NULL, 0, 0);
 
    if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
    if (ec->pointer_enter_sent) return;
 
-   px = wl_fixed_to_int(comp_wl->ptr.x);
-   py = wl_fixed_to_int(comp_wl->ptr.y);
+   px = wl_fixed_to_int(e_comp_wl->ptr.x);
+   py = wl_fixed_to_int(e_comp_wl->ptr.y);
 
    if (e_client_transform_core_enable_get(ec))
      {
@@ -1095,8 +1079,8 @@ _e_comp_wl_cursor_reload(E_Comp_Wl_Data *comp_wl, E_Client *ec)
    cy = py - ec->client.y;
 
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
@@ -1104,17 +1088,16 @@ _e_comp_wl_cursor_reload(E_Comp_Wl_Data *comp_wl, E_Client *ec)
                               wl_fixed_from_int(cx), wl_fixed_from_int(cy));
         ec->pointer_enter_sent = EINA_TRUE;
      }
-   wl_signal_emit(&comp_wl->ptr_constraints.surface_mousein_signal, ec);
+   wl_signal_emit(&e_comp_wl->ptr_constraints.surface_mousein_signal, ec);
 }
 
 static Eina_Bool
 _e_comp_wl_cursor_timer(void *data)
 {
    E_Client *ec = data;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    ELOGF("Mouse", "Cursor hide timer expired after %d sec.", ec, e_config->cursor_timer_interval);
-   if (!comp_wl || comp_wl->relative_ptr.activated) return ECORE_CALLBACK_CANCEL;
+   if (e_comp_wl->relative_ptr.activated) return ECORE_CALLBACK_CANCEL;
 
    e_comp_wl_cursor_hide(ec);
 
@@ -1129,12 +1112,12 @@ _e_comp_wl_device_send_axis(const char *dev_name, Evas_Device_Class dev_class, E
    struct wl_client *wc;
    Eina_List *l, *ll;
    wl_fixed_t f_value;
-   struct wl_resource *surface;
 
    if (!ec) return;
    if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    f_value = wl_fixed_from_double(value);
    wc = wl_resource_get_client(surface);
@@ -1195,10 +1178,8 @@ _e_comp_wl_device_handle_axes(const char *dev_name, Evas_Device_Class dev_class,
 }
 
 static Eina_Bool
-_e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec, E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec)
 {
-   E_Pointer *comp_pointer = e_comp_pointer_get();
-
    Eina_Bool ret = EINA_TRUE;
    switch (type)
      {
@@ -1206,15 +1187,15 @@ _e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec, E_Comp_Wl
           ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_IN, ec);
           if (!ret) break;
 
-          if (comp_wl->ptr.hide_tmr)
+          if (e_comp_wl->ptr.hide_tmr)
             {
-               ecore_timer_del(comp_wl->ptr.hide_tmr);
+               ecore_timer_del(e_comp_wl->ptr.hide_tmr);
                cursor_timer_ec = ec;
-               comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
+               e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
             }
           else
             {
-               if (e_pointer_is_hidden(comp_pointer))
+               if (e_pointer_is_hidden(e_comp->pointer))
                  ret = EINA_FALSE;
             }
           break;
@@ -1223,7 +1204,7 @@ _e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec, E_Comp_Wl
           ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_OUT, ec);
           if (!ret) break;
 
-          if (!comp_wl->ptr.hide_tmr && e_pointer_is_hidden(comp_pointer))
+          if (!e_comp_wl->ptr.hide_tmr && e_pointer_is_hidden(e_comp->pointer))
             ret = EINA_FALSE;
           break;
 
@@ -1231,31 +1212,31 @@ _e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Client *ec, E_Comp_Wl
           ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_MOVE, ec);
           if (!ret) break;
 
-          if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
-            _e_comp_wl_cursor_reload(comp_wl, ec);
+          if (e_pointer_is_hidden(e_comp->pointer) || !ec->pointer_enter_sent)
+            _e_comp_wl_cursor_reload(ec);
           break;
 
         case EVAS_CALLBACK_MOUSE_WHEEL:
           ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_WHEEL, ec);
           if (!ret) break;
 
-          if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
-            _e_comp_wl_cursor_reload(comp_wl, ec);
+          if (e_pointer_is_hidden(e_comp->pointer) || !ec->pointer_enter_sent)
+            _e_comp_wl_cursor_reload(ec);
           break;
 
         case EVAS_CALLBACK_MOUSE_DOWN:
           ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_DOWN, ec);
           if (!ret) break;
 
-          if (comp_wl->ptr.hide_tmr)
+          if (e_comp_wl->ptr.hide_tmr)
             {
-               ecore_timer_del(comp_wl->ptr.hide_tmr);
-               comp_wl->ptr.hide_tmr = NULL;
+               ecore_timer_del(e_comp_wl->ptr.hide_tmr);
+               e_comp_wl->ptr.hide_tmr = NULL;
             }
           cursor_timer_ec = NULL;
 
-          if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
-            _e_comp_wl_cursor_reload(comp_wl, ec);
+          if (e_pointer_is_hidden(e_comp->pointer) || !ec->pointer_enter_sent)
+            _e_comp_wl_cursor_reload(ec);
           break;
 
         case EVAS_CALLBACK_MOUSE_UP:
@@ -1310,27 +1291,25 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj
    Eina_List *l;
    uint32_t serial;
    E_Client *prev_ptr_ec;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    ev = event;
-   comp_wl->ptr.x = wl_fixed_from_int(ev->output.x);
-   comp_wl->ptr.y = wl_fixed_from_int(ev->output.y);
+
+   e_comp_wl->ptr.x = wl_fixed_from_int(ev->output.x);
+   e_comp_wl->ptr.y = wl_fixed_from_int(ev->output.y);
 
    if (!(ec = data)) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
-   prev_ptr_ec = comp_wl->ptr.ec;
+   prev_ptr_ec = e_comp_wl->ptr.ec;
    if (prev_ptr_ec)
      {
         ELOGF("Mouse", "In (prev_ptr_ec: %p pointer_enter_sent: %d)", ec, prev_ptr_ec, prev_ptr_ec->pointer_enter_sent);
         prev_ptr_ec->pointer_enter_sent = EINA_FALSE;
      }
 
-   comp_wl->ptr.ec = ec;
+   e_comp_wl->ptr.ec = ec;
 
    ELOGF("Mouse", "In  (obj: %p, time: %d, canvas(%d, %d) output(%d, %d), name:%20s)",
          ec, obj, ev->timestamp, ev->canvas.x, ev->canvas.y, ev->output.x, ev->output.y,
@@ -1338,26 +1317,26 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj
 
    if (_e_comp_wl_check_cursor_timer_needed(ec))
      {
-        if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_IN, ec, comp_wl))
+        if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_IN, ec))
           return;
      }
 
-   if (!eina_list_count(comp_wl->ptr.resources)) return;
+   if (!eina_list_count(e_comp_wl->ptr.resources)) return;
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
 
-        _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
+        _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
 
         wl_pointer_send_enter(res, serial, surface,
                               wl_fixed_from_int(ev->canvas.x - ec->client.x),
                               wl_fixed_from_int(ev->canvas.y - ec->client.y));
         ec->pointer_enter_sent = EINA_TRUE;
      }
-     wl_signal_emit(&comp_wl->ptr_constraints.surface_mousein_signal, ec);
+     wl_signal_emit(&e_comp_wl->ptr_constraints.surface_mousein_signal, ec);
 }
 
 static void
@@ -1370,24 +1349,20 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
    Eina_List *l;
    uint32_t serial;
    Eina_Bool inside_check;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
-   E_Comp *comp;
 
    ev = event;
 
    if (!(ec = data)) return;
-   if (!(comp = e_comp_get())) return;
    inside_check = E_INSIDE(ev->canvas.x, ev->canvas.y,
                           ec->client.x, ec->client.y, ec->client.w, ec->client.h);
    if (ec->cur_mouse_action && inside_check) return;
-   if (e_object_is_del(E_OBJECT(comp))) return;
+   if (e_object_is_del(E_OBJECT(e_comp))) return;
+   if (e_comp_wl->ptr.ec == ec)
+     e_comp_wl->ptr.ec = NULL;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
 
-   if (comp_wl->ptr.ec == ec)
-     comp_wl->ptr.ec = NULL;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    ELOGF("Mouse", "Out (obj: %p, time: %d, canvas(%d, %d) output(%d, %d), name:%20s)",
          ec, obj, ev->timestamp, ev->canvas.x, ev->canvas.y, ev->output.x, ev->output.y,
@@ -1395,45 +1370,46 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
 
    if (_e_comp_wl_check_cursor_timer_needed(ec))
      {
-        if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_OUT, ec, comp_wl))
+        if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_OUT, ec))
           return;
      }
 
-   if (!eina_list_count(comp_wl->ptr.resources)) return;
+   if (!eina_list_count(e_comp_wl->ptr.resources)) return;
 
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
         if (ec->pointer_enter_sent == EINA_FALSE) continue;
 
-        _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
+        _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, ev->timestamp);
 
         wl_pointer_send_leave(res, serial, surface);
         ec->pointer_enter_sent = EINA_FALSE;
      }
-     wl_signal_emit(&comp_wl->ptr_constraints.surface_mouseout_signal, ec);
+     wl_signal_emit(&e_comp_wl->ptr_constraints.surface_mouseout_signal, ec);
 }
 
 static void
-_e_comp_wl_send_touch(E_Client *ec, E_Comp_Wl_Data *comp_wl, int idx, int canvas_x, int canvas_y, uint32_t timestamp, Eina_Bool pressed)
+_e_comp_wl_send_touch(E_Client *ec, int idx, int canvas_x, int canvas_y, uint32_t timestamp, Eina_Bool pressed)
 {
    Eina_List *l;
    struct wl_client *wc;
    struct wl_resource *res;
    wl_fixed_t x, y;
    uint32_t serial;
-   struct wl_resource *surface;
 
    if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (_e_comp_wl_check_block_input(ec)) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    if (pressed)
      {
@@ -1455,7 +1431,7 @@ _e_comp_wl_send_touch(E_Client *ec, E_Comp_Wl_Data *comp_wl, int idx, int canvas
    x = wl_fixed_from_int(canvas_x - ec->client.x);
    y = wl_fixed_from_int(canvas_y - ec->client.y);
 
-   EINA_LIST_FOREACH(comp_wl->touch.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
         if (!e_comp_wl_input_touch_check(res)) continue;
@@ -1475,79 +1451,81 @@ _e_comp_wl_send_touch(E_Client *ec, E_Comp_Wl_Data *comp_wl, int idx, int canvas
         TRACE_INPUT_END();
      }
 
-   e_comp_wl_touch_frame_send_ec_set(comp_wl, ec);
+   e_comp_wl_touch_frame_send_ec_set(ec);
 }
 
 static void
-_e_comp_wl_send_touch_move(E_Client *ec, E_Comp_Wl_Data *comp_wl, int idx, int canvas_x, int canvas_y, uint32_t timestamp)
+_e_comp_wl_send_touch_move(E_Client *ec, int idx, int canvas_x, int canvas_y, uint32_t timestamp)
 {
    Eina_List *l;
    struct wl_client *wc;
    struct wl_resource *res;
    wl_fixed_t x, y;
-   struct wl_resource *surface;
 
    if (!ec) return;
    if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (_e_comp_wl_check_block_input(ec)) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    wc = wl_resource_get_client(surface);
 
    x = wl_fixed_from_int(canvas_x - ec->client.x);
    y = wl_fixed_from_int(canvas_y - ec->client.y);
 
-   EINA_LIST_FOREACH(comp_wl->touch.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
         if (!e_comp_wl_input_touch_check(res)) continue;
         wl_touch_send_motion(res, timestamp, idx, x, y);
      }
 
-   e_comp_wl_touch_frame_send_ec_set(comp_wl, ec);
+   e_comp_wl_touch_frame_send_ec_set(ec);
 }
 
 static void
-_e_comp_wl_send_touch_frame(E_Client *ec, E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_send_touch_frame(E_Client *ec)
 {
    Eina_List *l;
    struct wl_client *wc;
    struct wl_resource *res;
-   struct wl_resource *surface;
 
    if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (_e_comp_wl_check_block_input(ec)) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    wc = wl_resource_get_client(surface);
 
-   EINA_LIST_FOREACH(comp_wl->touch.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
         if (!e_comp_wl_input_touch_check(res)) continue;
         wl_touch_send_frame(res);
      }
 
-   e_comp_wl_touch_frame_send_ec_set(comp_wl, NULL);
+   e_comp_wl_touch_frame_send_ec_set(NULL);
 }
 
 static void
-_e_comp_wl_send_mouse_move(E_Client *ec, E_Comp_Wl_Data *comp_wl, int x, int y, unsigned int timestamp)
+_e_comp_wl_send_mouse_move(E_Client *ec, int x, int y, unsigned int timestamp)
 {
    struct wl_resource *res;
    struct wl_client *wc;
    Eina_List *l;
-   struct wl_resource *surface;
 
    if (!ec) return;
    if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    wc = wl_resource_get_client(surface);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
@@ -1558,26 +1536,26 @@ _e_comp_wl_send_mouse_move(E_Client *ec, E_Comp_Wl_Data *comp_wl, int x, int y,
 }
 
 static void
-_e_comp_wl_cursor_move_timer_control(E_Client *ec, E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_cursor_move_timer_control(E_Client *ec)
 {
-   if (comp_wl->ptr.hide_tmr)
+   if (e_comp_wl->ptr.hide_tmr)
      {
         if (cursor_timer_ec == ec)
           {
-             ecore_timer_interval_set(comp_wl->ptr.hide_tmr, e_config->cursor_timer_interval);
-             ecore_timer_reset(comp_wl->ptr.hide_tmr);
+             ecore_timer_interval_set(e_comp_wl->ptr.hide_tmr, e_config->cursor_timer_interval);
+             ecore_timer_reset(e_comp_wl->ptr.hide_tmr);
           }
         else
           {
-             ecore_timer_del(comp_wl->ptr.hide_tmr);
+             ecore_timer_del(e_comp_wl->ptr.hide_tmr);
              cursor_timer_ec = ec;
-             comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
+             e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
           }
      }
    else
      {
         cursor_timer_ec = ec;
-        comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
+        e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
      }
 }
 
@@ -1589,19 +1567,18 @@ _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
    Evas_Device *dev = NULL;
    const char *dev_name;
    E_Comp_Config *comp_conf;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    ev = event;
-   comp_wl->ptr.x = wl_fixed_from_int(ev->cur.output.x);
-   comp_wl->ptr.y = wl_fixed_from_int(ev->cur.output.y);
+
+   e_comp->wl_comp_data->ptr.x = wl_fixed_from_int(ev->cur.output.x);
+   e_comp->wl_comp_data->ptr.y = wl_fixed_from_int(ev->cur.output.y);
 
    if (!(ec = data)) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if ((ec->ignored) && (!ec->remote_surface.provider)) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
+
    if ((!need_send_motion) && (!need_send_released) && (e_client_visibility_get(ec) == E_VISIBILITY_FULLY_OBSCURED)) return;
 
    dev = ev->dev;
@@ -1615,76 +1592,72 @@ _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
 
    if (dev && (evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH))
      {
-        if (!comp_wl->drag_client)
+        if (!e_comp_wl->drag_client)
           {
-             comp_wl->touch.faked_ec = ec;
-             if (comp_wl->touch.pressed & (1 << 0))
+             e_comp_wl->touch.faked_ec = ec;
+             if (e_comp_wl->touch.pressed & (1 << 0))
                {
-                  _e_comp_wl_device_send_event_device(ec, comp_wl, dev, ev->timestamp);
+                  _e_comp_wl_device_send_event_device(ec, dev, ev->timestamp);
                   if (dev_name)
                     _e_comp_wl_device_handle_axes(dev_name, evas_device_class_get(dev),
                                                   ec, 0, ev->radius_x, ev->radius_y, ev->pressure, ev->angle);
-                  _e_comp_wl_send_touch_move(ec, comp_wl, 0, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
+                  _e_comp_wl_send_touch_move(ec, 0, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
                }
           }
 
-        e_pointer_touch_move(e_comp_pointer_get(), ev->cur.output.x, ev->cur.output.y);
+        e_pointer_touch_move(e_comp->pointer, ev->cur.output.x, ev->cur.output.y);
      }
    else
      {
-        if (!comp_wl->drag_client)
+        if (!e_comp_wl->drag_client)
           {
              if (_e_comp_wl_check_cursor_timer_needed(ec))
                {
-                  if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_MOVE, ec, comp_wl))
+                  if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_MOVE, ec))
                     return;
                }
 
-             _e_comp_wl_device_send_event_device(ec, comp_wl, dev, ev->timestamp);
-             _e_comp_wl_send_mouse_move(ec, comp_wl, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
+             _e_comp_wl_device_send_event_device(ec, dev, ev->timestamp);
+             _e_comp_wl_send_mouse_move(ec, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
 
              if (!need_send_released) // set cursor's hide_tmr only when mouse button is not pressed
                {
                   if (_e_comp_wl_check_cursor_timer_needed(ec))
-                    _e_comp_wl_cursor_move_timer_control(ec, comp_wl);
+                    _e_comp_wl_cursor_move_timer_control(ec);
                }
           }
 
-        e_pointer_mouse_move(e_comp_pointer_get(), ev->cur.output.x, ev->cur.output.y);
+        e_pointer_mouse_move(e_comp->pointer, ev->cur.output.x, ev->cur.output.y);
      }
 }
 
 static void
-_e_comp_wl_evas_handle_mouse_button_to_touch(E_Client *ec, E_Comp_Wl_Data *comp_wl, uint32_t timestamp, int canvas_x, int canvas_y, Eina_Bool flag)
+_e_comp_wl_evas_handle_mouse_button_to_touch(E_Client *ec, uint32_t timestamp, int canvas_x, int canvas_y, Eina_Bool flag)
 {
-   struct wl_resource *surface;
-
-   if (ec->cur_mouse_action || comp_wl->drag) return;
+   if (ec->cur_mouse_action || e_comp_wl->drag) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
    if ((ec->ignored) && (!ec->remote_surface.provider)) return;
 
-   comp_wl->ptr.button = BTN_LEFT;
+   e_comp_wl->ptr.button = BTN_LEFT;
 
-   _e_comp_wl_send_touch(ec, comp_wl, 0, canvas_x, canvas_y, timestamp, flag);
+   _e_comp_wl_send_touch(ec, 0, canvas_x, canvas_y, timestamp, flag);
 }
 
 static void
 _e_comp_wl_evas_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event)
 {
-   E_Client *ec;
-   Evas_Event_Mouse_Down *ev;
+   E_Client *ec = data;
+   Evas_Event_Mouse_Down *ev = event;
    Evas_Device *dev = NULL;
    const Evas_Device *seat_dev;
    const char *dev_name, *seat_name;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(ec = data)) return;
+   if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (_e_comp_wl_check_block_input(ec)) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
 
-   ev = event;
    dev = ev->dev;
    dev_name = evas_device_description_get(dev);
 
@@ -1695,32 +1668,32 @@ _e_comp_wl_evas_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
          ec, obj, ev->button, ev->timestamp, ev->output.x, ev->output.y, e_client_util_name_get(ec),
          dev_name, seat_name);
 
-   _e_comp_wl_device_send_event_device(ec, comp_wl, dev, ev->timestamp);
+   _e_comp_wl_device_send_event_device(ec, dev, ev->timestamp);
 
    if (dev &&  (evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH))
      {
-        comp_wl->touch.faked_ec = ec;
+        e_comp_wl->touch.faked_ec = ec;
 
         if (dev_name)
           _e_comp_wl_device_renew_axis(dev_name, evas_device_class_get(dev),
                                         ec, 0, ev->radius_x, ev->radius_y, ev->pressure, ev->angle);
-        _e_comp_wl_evas_handle_mouse_button_to_touch(ec, comp_wl, ev->timestamp, ev->canvas.x, ev->canvas.y, EINA_TRUE);
+        _e_comp_wl_evas_handle_mouse_button_to_touch(ec, ev->timestamp, ev->canvas.x, ev->canvas.y, EINA_TRUE);
 
-        e_pointer_touch_move(e_comp_pointer_get(), ev->output.x, ev->output.y);
-        comp_wl->touch.pressed |= (1 << 0);
+        e_pointer_touch_move(e_comp->pointer, ev->output.x, ev->output.y);
+        e_comp_wl->touch.pressed |= (1 << 0);
      }
    else
      {
         if (_e_comp_wl_check_cursor_timer_needed(ec))
           {
-             if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_DOWN, ec, comp_wl))
+             if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_DOWN, ec))
                return;
           }
 
-        e_comp_wl_evas_handle_mouse_button(ec, comp_wl, ev->timestamp, ev->button,
+        e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button,
                                            WL_POINTER_BUTTON_STATE_PRESSED);
 
-        e_pointer_mouse_move(e_comp_pointer_get(), ev->output.x, ev->output.y);
+        e_pointer_mouse_move(e_comp->pointer, ev->output.x, ev->output.y);
      }
 
    need_send_released = EINA_TRUE;
@@ -1729,25 +1702,23 @@ _e_comp_wl_evas_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
 static void
 _e_comp_wl_evas_cb_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event)
 {
-   E_Client *ec;
-   Evas_Event_Mouse_Up *ev;
+   E_Client *ec = data;
+   Evas_Event_Mouse_Up *ev = event;
    Evas_Device *dev = NULL;
    const Evas_Device *seat_dev;
    const char *dev_name, *seat_name;;
    Evas_Event_Flags flags;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(ec = data)) return;
+   if (!ec) return;
    if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (_e_comp_wl_check_block_input(ec)) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    if (!need_send_released)
      {
         need_send_motion = EINA_TRUE;
      }
-   ev = event;
+
    dev = ev->dev;
    dev_name = evas_device_description_get(dev);
 
@@ -1761,36 +1732,36 @@ _e_comp_wl_evas_cb_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *even
 
    if (dev && (evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH))
      {
-        comp_wl->touch.pressed &= ~(1 << 0);
+        e_comp_wl->touch.pressed &= ~(1 << 0);
 
-        if (!comp_wl->touch.pressed && comp_wl->touch.faked_ec)
-          comp_wl->touch.faked_ec = NULL;
+        if (!e_comp_wl->touch.pressed && e_comp_wl->touch.faked_ec)
+          e_comp_wl->touch.faked_ec = NULL;
      }
 
    if (flags & EVAS_EVENT_FLAG_ON_HOLD) goto finish;
 
-   _e_comp_wl_device_send_event_device(ec, comp_wl, dev, ev->timestamp);
+   _e_comp_wl_device_send_event_device(ec, dev, ev->timestamp);
 
    if (dev && (evas_device_class_get(dev) == EVAS_DEVICE_CLASS_TOUCH))
      {
         if (dev_name)
           _e_comp_wl_device_handle_axes(dev_name, evas_device_class_get(dev),
                                         ec, 0, ev->radius_x, ev->radius_y, ev->pressure, ev->angle);
-        _e_comp_wl_evas_handle_mouse_button_to_touch(ec, comp_wl, ev->timestamp, ev->canvas.x, ev->canvas.y, EINA_FALSE);
+        _e_comp_wl_evas_handle_mouse_button_to_touch(ec, ev->timestamp, ev->canvas.x, ev->canvas.y, EINA_FALSE);
      }
    else
      {
         if (_e_comp_wl_check_cursor_timer_needed(ec))
           {
-             if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_UP, ec, comp_wl))
+             if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_UP, ec))
                return;
           }
 
-        e_comp_wl_evas_handle_mouse_button(ec, comp_wl, ev->timestamp, ev->button,
+        e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button,
                                            WL_POINTER_BUTTON_STATE_RELEASED);
 
         if (_e_comp_wl_check_cursor_timer_needed(ec))
-          _e_comp_wl_cursor_move_timer_control(ec, comp_wl);
+          _e_comp_wl_cursor_move_timer_control(ec);
      }
 
 finish:
@@ -1798,13 +1769,12 @@ finish:
 }
 
 static void
-_e_comp_wl_mouse_wheel_send(E_Client *ec, E_Comp_Wl_Data *comp_wl, int direction, int z, int timestamp)
+_e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, int timestamp)
 {
    struct wl_resource *res;
    struct wl_client *wc;
    Eina_List *l;
    uint32_t axis, dir;
-   struct wl_resource *surface;
 
    if (direction == 0)
      axis = WL_POINTER_AXIS_VERTICAL_SCROLL;
@@ -1818,10 +1788,11 @@ _e_comp_wl_mouse_wheel_send(E_Client *ec, E_Comp_Wl_Data *comp_wl, int direction
 
    if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    wc = wl_resource_get_client(surface);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
@@ -1834,62 +1805,58 @@ _e_comp_wl_evas_cb_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Evas_Object *
 {
    E_Client *ec;
    Evas_Event_Mouse_Wheel *ev;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
+   ev = event;
    if (!(ec = data)) return;
    if (ec->cur_mouse_action) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if ((ec->ignored) && (!ec->remote_surface.provider)) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
-   if (!eina_list_count(comp_wl->ptr.resources))
+   if (!eina_list_count(e_comp_wl->ptr.resources))
      return;
 
    if (_e_comp_wl_check_cursor_timer_needed(ec))
       {
-         if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec, comp_wl))
+         if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec))
            return;
       }
 
-   ev = event;
-   _e_comp_wl_device_send_event_device(ec, comp_wl, ev->dev, ev->timestamp);
+   _e_comp_wl_device_send_event_device(ec, ev->dev, ev->timestamp);
 
-   _e_comp_wl_mouse_wheel_send(ec, comp_wl, ev->direction, ev->z, ev->timestamp);
+   _e_comp_wl_mouse_wheel_send(ec, ev->direction, ev->z, ev->timestamp);
 
    if (!need_send_released) // set cursor's hide_tmr only when mouse button is not pressed
      {
         if (_e_comp_wl_check_cursor_timer_needed(ec))
-          _e_comp_wl_cursor_move_timer_control(ec, comp_wl);
+          _e_comp_wl_cursor_move_timer_control(ec);
      }
 }
 
 static void
 _e_comp_wl_evas_cb_multi_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj, void *event)
 {
-   E_Client *ec;
-   Evas_Event_Multi_Down *ev;
+   E_Client *ec = data;
+   Evas_Event_Multi_Down *ev = event;
    Evas_Device *dev = NULL;
    const Evas_Device *seat_dev;
    const char *dev_name, *seat_name;
    Evas_Device_Class dev_class;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
-   if (!(ec = data)) return;
+   if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (_e_comp_wl_check_block_input(ec)) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    /* Do not deliver emulated single touch events to client */
-   ev = event;
    if (ev->device == 0) return;
 
    dev = ev->dev;
    dev_name = evas_device_description_get(dev);
-   comp_wl->touch.faked_ec = ec;
+   e_comp_wl->touch.faked_ec = ec;
 
    seat_dev = evas_device_parent_get(dev);
    seat_name = evas_device_name_get(seat_dev);
@@ -1901,42 +1868,40 @@ _e_comp_wl_evas_cb_multi_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *o
    if (dev && dev_name)
      {
         dev_class = evas_device_class_get(dev);
-        _e_comp_wl_device_send_event_device(ec, comp_wl, dev, ev->timestamp);
+        _e_comp_wl_device_send_event_device(ec, dev, ev->timestamp);
         _e_comp_wl_device_renew_axis(dev_name, dev_class, ec, ev->device, ev->radius_x, ev->radius_y, ev->pressure, ev->angle);
      }
 
-   _e_comp_wl_send_touch(ec, comp_wl, ev->device, ev->canvas.x, ev->canvas.y, ev->timestamp, EINA_TRUE);
-   comp_wl->touch.pressed |= (1 << ev->device);
+   _e_comp_wl_send_touch(ec, ev->device, ev->canvas.x, ev->canvas.y, ev->timestamp, EINA_TRUE);
+   e_comp_wl->touch.pressed |= (1 << ev->device);
 }
 
 static void
 _e_comp_wl_evas_cb_multi_up(void *data, Evas *evas, Evas_Object *obj EINA_UNUSED, void *event)
 {
-   E_Client *ec;
-   Evas_Event_Multi_Up *ev;
+   E_Client *ec = data;
+   Evas_Event_Multi_Up *ev = event;
    Evas_Device *dev = NULL;
    const Evas_Device *seat_dev;
    const char *dev_name, *seat_name;
    Evas_Device_Class dev_class;
    Evas_Event_Flags flags;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
-   if (!(ec = data)) return;
+   if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (_e_comp_wl_check_block_input(ec)) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    /* Do not deliver emulated single touch events to client */
-   ev = event;
    if (ev->device == 0) return;
 
    flags = evas_event_default_flags_get(evas);
 
-   comp_wl->touch.pressed &= ~(1 << ev->device);
-   if (!comp_wl->touch.pressed && comp_wl->touch.faked_ec)
-     comp_wl->touch.faked_ec = NULL;
+   e_comp_wl->touch.pressed &= ~(1 << ev->device);
+   if (!e_comp_wl->touch.pressed && e_comp_wl->touch.faked_ec)
+     e_comp_wl->touch.faked_ec = NULL;
 
    if (flags & EVAS_EVENT_FLAG_ON_HOLD) return;
 
@@ -1953,58 +1918,51 @@ _e_comp_wl_evas_cb_multi_up(void *data, Evas *evas, Evas_Object *obj EINA_UNUSED
    if (dev && dev_name)
      {
         dev_class = evas_device_class_get(dev);
-        _e_comp_wl_device_send_event_device(ec, comp_wl, dev, ev->timestamp);
+        _e_comp_wl_device_send_event_device(ec, dev, ev->timestamp);
         _e_comp_wl_device_handle_axes(dev_name, dev_class, ec, ev->device, ev->radius_x, ev->radius_y, ev->pressure, ev->angle);
      }
 
-   _e_comp_wl_send_touch(ec, comp_wl, ev->device, 0, 0, ev->timestamp, EINA_FALSE);
+   _e_comp_wl_send_touch(ec, ev->device, 0, 0, ev->timestamp, EINA_FALSE);
 }
 
 static void
 _e_comp_wl_evas_cb_multi_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
 {
-   E_Client *ec;
-   Evas_Event_Multi_Move *ev;
+   E_Client *ec = data;
+   Evas_Event_Multi_Move *ev = event;
    Evas_Device *dev = NULL;
    const char *dev_name;
    Evas_Device_Class dev_class;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
-   if (!(ec = data)) return;
+   if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    /* Do not deliver emulated single touch events to client */
-   ev = event;
    if (ev->device == 0) return;
 
-   comp_wl->touch.faked_ec = ec;
+   e_comp_wl->touch.faked_ec = ec;
 
-   if (comp_wl->touch.pressed & (1 << ev->device))
+   if (e_comp_wl->touch.pressed & (1 << ev->device))
      {
         dev = ev->dev;
         if (dev && (dev_name = evas_device_description_get(dev)))
           {
              dev_class = evas_device_class_get(dev);
-             _e_comp_wl_device_send_event_device(ec, comp_wl, dev, ev->timestamp);
+             _e_comp_wl_device_send_event_device(ec, dev, ev->timestamp);
              _e_comp_wl_device_handle_axes(dev_name, dev_class, ec, ev->device, ev->radius_x, ev->radius_y, ev->pressure, ev->angle);
           }
 
-        _e_comp_wl_send_touch_move(ec, comp_wl, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
+        _e_comp_wl_send_touch_move(ec, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp);
      }
 }
 
 static Eina_Bool
 _e_comp_wl_cb_touch_frame(void *data, int type, void *event)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return ECORE_CALLBACK_PASS_ON;
-
-   E_Client *ec = e_comp_wl_touch_frame_send_ec_get(comp_wl);
-   _e_comp_wl_send_touch_frame(ec, comp_wl);
+   E_Client *ec = e_comp_wl_touch_frame_send_ec_get();
+   _e_comp_wl_send_touch_frame(ec);
    return ECORE_CALLBACK_PASS_ON;
 }
 
@@ -2075,7 +2033,7 @@ _e_comp_wl_client_priority_normal(E_Client *ec)
 }
 
 static void
-_e_comp_wl_input_thread_send_keys(E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_input_thread_send_keys()
 {
    uint32_t serial;
    E_Comp_Wl_Key_Data *k;
@@ -2088,7 +2046,7 @@ _e_comp_wl_input_thread_send_keys(E_Comp_Wl_Data *comp_wl)
         return;
      }
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    t = ecore_time_unix_get();
 
    EINA_LIST_FOREACH(e_comp_input_key->kbd.focused, l, res)
@@ -2105,16 +2063,13 @@ _e_comp_wl_input_thread_send_keys(E_Comp_Wl_Data *comp_wl)
 static Eina_Bool
 _e_comp_wl_evas_cb_focus_in_timer(E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
-
    if (!ec) return EINA_FALSE;
    if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
    if (!ec->comp_data) return EINA_FALSE;
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
 
    ec->comp_data->on_focus_timer = NULL;
 
-   _e_comp_wl_input_thread_send_keys(comp_wl);
+   _e_comp_wl_input_thread_send_keys(NULL);
 
    return EINA_FALSE;
 }
@@ -2122,12 +2077,13 @@ _e_comp_wl_evas_cb_focus_in_timer(E_Client *ec)
 static void
 _e_comp_wl_input_thread_focus_in(void *data)
 {
-   struct wl_resource *surface;
+   struct wl_resource *surface = NULL;
    struct wl_resource *res;
    struct wl_client *wc;
    Eina_List *l;
 
-   if (!(surface = data)) return;
+   EINA_SAFETY_ON_NULL_RETURN(data);
+   surface = *(struct wl_resource **)data;
 
    wc = wl_resource_get_client(surface);
 
@@ -2158,7 +2114,6 @@ EINTERN void
 e_comp_wl_feed_focus_in(E_Client *ec)
 {
    E_Client *focused;
-   struct wl_resource *surface;
 
    if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
@@ -2171,7 +2126,8 @@ e_comp_wl_feed_focus_in(E_Client *ec)
    /* raise client priority */
    _e_comp_wl_client_priority_raise(ec);
 
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    INF("send focus in request to input thread. surface(%p)\n", surface);
    _e_comp_wl_input_thread_focus_in(&surface);
@@ -2180,7 +2136,7 @@ e_comp_wl_feed_focus_in(E_Client *ec)
       ecore_timer_add(((e_config->xkb.delay_held_key_input_to_focus)/1000.0),
                       (Ecore_Task_Cb)_e_comp_wl_evas_cb_focus_in_timer, ec);
    int rotation = ec->e.state.rot.ang.curr;
-   e_pointer_rotation_set(e_comp_pointer_get(), rotation);
+   e_pointer_rotation_set(e_comp->pointer, rotation);
 }
 
 static void
@@ -2192,28 +2148,32 @@ _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj
 }
 
 static void
-_e_comp_wl_input_thread_focus_out(void *data, E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_input_thread_focus_out(void *data)
 {
-   struct wl_resource *surface;
+   struct wl_resource *surface = NULL;
    struct wl_resource *res;
    uint32_t serial;
    E_Comp_Wl_Key_Data *k;
    Eina_List *l, *ll;
    double t;
 
-   if (!(surface = data)) return;
+   EINA_SAFETY_ON_NULL_RETURN(data);
+
+   surface = *(struct wl_resource **)data;
 
    /* update keyboard modifier state */
    wl_array_for_each(k, &e_comp_input_key->kbd.keys)
       e_comp_wl_input_keyboard_state_update(k->key, EINA_FALSE);
 
+   if (!surface) return;
+
    if (!eina_list_count(e_comp_input_key->kbd.resources))
      {
         return;
      }
 
    /* send keyboard_leave to all keyboard resources */
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    t = ecore_time_unix_get();
 
    EINA_LIST_FOREACH_SAFE(e_comp_input_key->kbd.focused, l, ll, res)
@@ -2234,12 +2194,9 @@ static void
 _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
 {
    E_Client *ec;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
-
    if (!(ec = data)) return;
+
    if (!ec->comp_data) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    E_FREE_FUNC(ec->comp_data->on_focus_timer, ecore_timer_del);
 
@@ -2247,9 +2204,9 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
    if (!e_object_is_del(data))
      _e_comp_wl_client_priority_normal(ec);
 
-   surface = e_comp_wl_client_surface_get(ec);
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
    INF("send focus out request to input thread. surface(%p)\n", surface);
-   _e_comp_wl_input_thread_focus_out(&surface, comp_wl);
+   _e_comp_wl_input_thread_focus_out(&surface);
 }
 
 static void
@@ -2415,23 +2372,17 @@ _e_comp_wl_cb_comp_object_add(void *data EINA_UNUSED, int type EINA_UNUSED, E_Ev
 }
 
 static Eina_Bool
-_e_comp_wl_cb_mouse_move(void *data, int t EINA_UNUSED, Ecore_Event_Mouse_Move *ev)
+_e_comp_wl_cb_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_Move *ev)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   /* To Do : confirm what return value is acceptable
-      (wait to E_Comp_Wl_Data is available? or cancel callback ?) */
-   if (!(comp_wl = e_comp_wl_get())) return ECORE_CALLBACK_RENEW;
-
-   comp_wl->ptr.x = wl_fixed_from_int(ev->x);
-   comp_wl->ptr.y = wl_fixed_from_int(ev->y);
+   e_comp_wl->ptr.x = wl_fixed_from_int(ev->x);
+   e_comp_wl->ptr.y = wl_fixed_from_int(ev->y);
 
    return ECORE_CALLBACK_RENEW;
 }
 
 static void
-_e_comp_wl_send_mouse_relative_move(E_Client *ec, E_Comp_Wl_Data *comp_wl,
-                                    int dx, int dy, int dx_unaccel, int dy_unaccel,
+_e_comp_wl_send_mouse_relative_move(E_Client *ec, int dx, int dy,
+                                    int dx_unaccel, int dy_unaccel,
                                     unsigned int timestamp)
 {
    struct wl_resource *surface;
@@ -2442,12 +2393,13 @@ _e_comp_wl_send_mouse_relative_move(E_Client *ec, E_Comp_Wl_Data *comp_wl,
 
    if (!ec) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return;
+   surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return;
 
    wc = wl_resource_get_client(surface);
    comp_conf = e_comp_config_get();
 
-   EINA_LIST_FOREACH(comp_wl->relative_ptr.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->relative_ptr.resources, l, res)
      {
         if (!e_comp_wl_input_relative_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
@@ -2468,13 +2420,11 @@ _e_comp_wl_send_mouse_relative_move(E_Client *ec, E_Comp_Wl_Data *comp_wl,
 }
 
 static Eina_Bool
-_e_comp_wl_cb_mouse_relative_move(void *data, int t EINA_UNUSED, Ecore_Event_Mouse_Relative_Move *ev)
+_e_comp_wl_cb_mouse_relative_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_Relative_Move *ev)
 {
    E_Client *ec;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   ec = comp_wl->ptr_constraints.ec;
+   ec = e_comp_wl->ptr_constraints.ec;
    if (!ec)
      {
         for (int i = 1; i < E_DEVICEMGR_BOUNDARY_MAX + 1; i++)
@@ -2490,7 +2440,7 @@ _e_comp_wl_cb_mouse_relative_move(void *data, int t EINA_UNUSED, Ecore_Event_Mou
                   if (ec)
                     {
                        ELOGF("Mouse", "Relative Move. Clamped boundary:%d", ec, i);
-                       _e_comp_wl_send_mouse_relative_move(ec, comp_wl, ev->dx, ev->dy, ev->dx_unaccel, ev->dy_unaccel, ev->timestamp);
+                       _e_comp_wl_send_mouse_relative_move(ec, ev->dx, ev->dy, ev->dx_unaccel, ev->dy_unaccel, ev->timestamp);
                     }
                }
              else if ((e_devicemgr->relative_motion_grab.prev_boundaries & (1 << i)))
@@ -2504,7 +2454,7 @@ _e_comp_wl_cb_mouse_relative_move(void *data, int t EINA_UNUSED, Ecore_Event_Mou
                   if (ec)
                     {
                        ELOGF("Mouse", "Relative Move. Prev Clamped boundary:%d", ec, i);
-                       _e_comp_wl_send_mouse_relative_move(ec, comp_wl, ev->dx, ev->dy, ev->dx_unaccel, ev->dy_unaccel, ev->timestamp);
+                       _e_comp_wl_send_mouse_relative_move(ec, ev->dx, ev->dy, ev->dx_unaccel, ev->dy_unaccel, ev->timestamp);
 
                        e_devicemgr->relative_motion_grab.prev_boundaries &= ~(1 << i);
                     }
@@ -2513,26 +2463,23 @@ _e_comp_wl_cb_mouse_relative_move(void *data, int t EINA_UNUSED, Ecore_Event_Mou
      }
    else
      {
-        _e_comp_wl_send_mouse_relative_move(ec, comp_wl, ev->dx, ev->dy, ev->dx_unaccel, ev->dy_unaccel, ev->timestamp);
+        _e_comp_wl_send_mouse_relative_move(ec, ev->dx, ev->dy, ev->dx_unaccel, ev->dy_unaccel, ev->timestamp);
      }
 
    return ECORE_CALLBACK_DONE;
 }
 
 static Eina_Bool
-_e_comp_wl_cb_mouse_button_cancel(void *data, int t EINA_UNUSED, Ecore_Event_Mouse_Button *ev)
+_e_comp_wl_cb_mouse_button_cancel(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_Button *ev)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (comp_wl)
-     _e_comp_wl_touch_cancel(comp_wl);
+   _e_comp_wl_touch_cancel();
 
    return ECORE_CALLBACK_PASS_ON;
 }
 
 static Eina_Bool
-_e_comp_wl_cb_zone_display_state_change(void *data, int t EINA_UNUSED, E_Event_Zone_Display_State_Change *ev)
+_e_comp_wl_cb_zone_display_state_change(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Zone_Display_State_Change *ev)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    if (!ev) return ECORE_CALLBACK_PASS_ON;
 
    E_Zone *zone = ev->zone;
@@ -2540,8 +2487,8 @@ _e_comp_wl_cb_zone_display_state_change(void *data, int t EINA_UNUSED, E_Event_Z
    E_OBJECT_CHECK_RETURN(zone, ECORE_CALLBACK_PASS_ON);
    E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, ECORE_CALLBACK_PASS_ON);
 
-   if (comp_wl && !e_zone_is_displaying(zone))
-     _e_comp_wl_touch_cancel(comp_wl);
+   if (!e_zone_is_displaying(zone))
+     _e_comp_wl_touch_cancel();
 
    return ECORE_CALLBACK_PASS_ON;
 }
@@ -2595,7 +2542,7 @@ _e_comp_wl_cb_client_rot_change_end(void *d EINA_UNUSED, int t EINA_UNUSED, E_Ev
    if (!focused_ec) return ECORE_CALLBACK_PASS_ON;
 
    rotation = focused_ec->e.state.rot.ang.curr;
-   e_pointer_rotation_set(e_comp_pointer_get(), rotation);
+   e_pointer_rotation_set(e_comp->pointer, rotation);
 
    return ECORE_CALLBACK_PASS_ON;
 }
@@ -2767,18 +2714,15 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
    E_Comp_Wl_Buffer_Viewport *vp = &cdata->scaler.buffer_viewport;
    E_Surface *surface = e_surface_from_ec(ec);
    E_Zone *zone;
-   E_Comp *comp;
-
 
    if (ec->ignored)
      {
-        comp = e_comp_get();
-        if (comp && 
-            ((ec->internal) || (cdata->shell.surface && state->new_attach)))
+        if ((ec->internal) ||
+            (cdata->shell.surface && state->new_attach))
           {
              EC_CHANGED(ec);
              ec->new_client = 1;
-             comp->new_clients++;
+             e_comp->new_clients++;
              ELOGF("COMP", "Unignore", ec);
              e_client_unignore(ec);
           }
@@ -2910,19 +2854,17 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
    if ((state->new_attach) ||
        (state->buffer_viewport.changed))
      {
-        E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-        if (comp_wl &&
-            (comp_wl->drag) &&
-            (comp_wl->drag_client) &&
-            (comp_wl->drag_client == ec))
+        if ((e_comp_wl->drag) &&
+            (e_comp_wl->drag_client) &&
+            (e_comp_wl->drag_client == ec))
           {
-             e_drag_reference_point_set(comp_wl->drag, state->sx, state->sy);
+             e_drag_reference_point_set(e_comp_wl->drag, state->sx, state->sy);
 
-             e_drag_move(comp_wl->drag,
-                         comp_wl->drag->x,
-                         comp_wl->drag->y);
+             e_drag_move(e_comp_wl->drag,
+                         e_comp_wl->drag->x,
+                         e_comp_wl->drag->y);
 
-             e_drag_resize(comp_wl->drag,
+             e_drag_resize(e_comp_wl->drag,
                            state->bw, state->bh);
           }
         else if ((cdata->shell.surface) &&
@@ -2983,7 +2925,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
         else
           {
              Eina_List *damages = NULL;
-             E_Comp_Wl_Data *comp_wl;
 
              if (buffer)
                _e_comp_wl_buffer_damage_set(buffer, state->buffer_damages);
@@ -3010,19 +2951,15 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
              EINA_LIST_FREE(state->damages, dmg)
                damages = eina_list_append(damages, dmg);
 
-             comp_wl = e_comp_wl_get();
-             if (comp_wl)
+             EINA_LIST_FREE(damages, dmg)
                {
-                  EINA_LIST_FREE(damages, dmg)
-                    {
-                       /* not creating damage for ec that shows a underlay video */
-                       if (state->buffer_viewport.changed ||
-                          (!comp_wl->available_hw_accel.underlay) ||
-                          !buffer || buffer->type != E_COMP_WL_BUFFER_TYPE_VIDEO)
-                       e_view_client_damage(e_client_view_get(ec), dmg->x, dmg->y, dmg->w, dmg->h);
+                  /* not creating damage for ec that shows a underlay video */
+                  if (state->buffer_viewport.changed ||
+                      !e_comp->wl_comp_data->available_hw_accel.underlay ||
+                      !buffer || buffer->type != E_COMP_WL_BUFFER_TYPE_VIDEO)
+                    e_view_client_damage(e_client_view_get(ec), dmg->x, dmg->y, dmg->w, dmg->h);
 
-                       eina_rectangle_free(dmg);
-                    }
+                  eina_rectangle_free(dmg);
                }
           }
      }
@@ -3138,11 +3075,10 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
 
    if ((cdata->video_client) &&
        ((buffer) &&
-        (buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO)))
+        (buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO)) &&
+       (e_comp->wl_comp_data->available_hw_accel.underlay))
      {
-        E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-        if (comp_wl && comp_wl->available_hw_accel.underlay)
-          e_pixmap_image_clear(ec->pixmap, 1);
+        e_pixmap_image_clear(ec->pixmap, 1);
      }
 
    state->buffer_viewport.changed = 0;
@@ -3265,9 +3201,6 @@ _e_comp_wl_connected_client_cb_destroy(struct wl_listener *listener, void *data)
    struct wl_client *client = data;
    E_Comp_Connected_Client_Info *cinfo;
    E_Appinfo *eai;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
 
    cinfo = wl_container_of(listener, cinfo, destroy);
 
@@ -3278,7 +3211,7 @@ _e_comp_wl_connected_client_cb_destroy(struct wl_listener *listener, void *data)
    if (e_appinfo_owner_get(eai) == E_APPINFO_OWNER_SERVER)
      e_appinfo_del(eai);
 
-   comp->connected_clients = eina_list_remove(comp->connected_clients, cinfo);
+   e_comp->connected_clients = eina_list_remove(e_comp->connected_clients, cinfo);
 
    wl_list_remove(&cinfo->destroy.link);
    eina_stringshare_del(cinfo->name);
@@ -3289,9 +3222,6 @@ static void
 _e_comp_wl_connected_client_create(struct wl_client *client, char *name, pid_t pid, uid_t uid, gid_t gid)
 {
    E_Comp_Connected_Client_Info *cinfo;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
 
    cinfo = E_NEW(E_Comp_Connected_Client_Info, 1);
    EINA_SAFETY_ON_NULL_RETURN(cinfo);
@@ -3302,7 +3232,7 @@ _e_comp_wl_connected_client_create(struct wl_client *client, char *name, pid_t p
    cinfo->gid = gid;
    cinfo->destroy.notify = _e_comp_wl_connected_client_cb_destroy;
    wl_client_add_destroy_listener(client, &cinfo->destroy);
-   comp->connected_clients = eina_list_append(comp->connected_clients, cinfo);
+   e_comp->connected_clients = eina_list_append(e_comp->connected_clients, cinfo);
 
    _e_comp_wl_pid_hook_call(E_COMP_WL_PID_HOOK_CONNECTED_CLIENT_CREATE, pid);
 }
@@ -3310,9 +3240,10 @@ _e_comp_wl_connected_client_create(struct wl_client *client, char *name, pid_t p
 static void
 _e_input_thread_client_cb_focus_set(void *data)
 {
-   struct wl_resource *surface;
+   struct wl_resource *surface = NULL;
 
-   if (!(surface = data)) return;
+   EINA_SAFETY_ON_NULL_RETURN(data);
+   surface = *(struct wl_resource **)data;
 
    INF("[input thread|%s] surface(%p)", __func__, surface);
 
@@ -3338,9 +3269,10 @@ _e_comp_wl_client_cb_focus_set(void *data EINA_UNUSED, E_Client *ec)
 static void
 _e_input_thread_client_cb_focus_unset(void *data)
 {
-   struct wl_resource *surface;
+   struct wl_resource *surface = NULL;
 
-   if (!(surface = data)) return;
+   EINA_SAFETY_ON_NULL_RETURN(data);
+   surface = *(struct wl_resource **)data;
 
    INF("[input thread|%s] surface(%p)", __func__, surface);
 
@@ -3379,14 +3311,11 @@ _e_comp_wl_client_cb_resize_begin(void *data EINA_UNUSED, E_Client *ec)
 static void
 _e_comp_wl_client_cb_resize_end(void *data EINA_UNUSED, E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
    if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
 
-   comp_wl->resize.edges = 0;
-   comp_wl->resize.resource = NULL;
+   e_comp_wl->resize.edges = 0;
+   e_comp_wl->resize.resource = NULL;
 }
 
 static void
@@ -3518,7 +3447,7 @@ send_info:
 }
 
 static void
-_e_comp_wl_gl_init(E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_gl_init(void *data EINA_UNUSED)
 {
    Evas *evas = NULL;
    Evas_GL *evasgl = NULL;
@@ -3528,9 +3457,7 @@ _e_comp_wl_gl_init(E_Comp_Wl_Data *comp_wl)
    Evas_GL_Config *cfg = NULL;
    Eina_Bool res;
    E_Comp_Wl_Evas_Gl *evas_gl = NULL;
-   E_Comp *comp;
-   
-   if (!(comp = e_comp_get())) return;
+
    if (!e_comp_gl_get()) return;
 
    evas_gl = E_NEW(E_Comp_Wl_Evas_Gl, 1);
@@ -3542,10 +3469,10 @@ _e_comp_wl_gl_init(E_Comp_Wl_Data *comp_wl)
    /* if wl_drm module doesn't call e_comp_canvas_init yet,
     * then we should get evas from ecore_evas.
     */
-   if (comp->evas)
-     evas = comp->evas;
+   if (e_comp->evas)
+     evas = e_comp->evas;
    else
-     evas = ecore_evas_get(comp->ee);
+     evas = ecore_evas_get(e_comp->ee);
 
    evasgl = evas_gl_new(evas);
    EINA_SAFETY_ON_NULL_GOTO(evasgl, err);
@@ -3557,7 +3484,7 @@ _e_comp_wl_gl_init(E_Comp_Wl_Data *comp_wl)
      {
         evas_gl_free(evasgl);
         free(evas_gl);
-        comp->gl = 1;
+        e_comp->gl = 1;
         e_main_ts_end("\tE_Comp_Wl_GL Init Done");
         return;
      }
@@ -3574,7 +3501,7 @@ _e_comp_wl_gl_init(E_Comp_Wl_Data *comp_wl)
    res = evas_gl_make_current(evasgl, sfc, ctx);
    EINA_SAFETY_ON_FALSE_GOTO(res, err);
 
-   res = glapi->evasglBindWaylandDisplay(evasgl, comp_wl->wl.disp);
+   res = glapi->evasglBindWaylandDisplay(evasgl, e_comp_wl->wl.disp);
    EINA_SAFETY_ON_FALSE_GOTO(res, err);
 
    evas_gl_config_free(cfg);
@@ -3584,10 +3511,10 @@ _e_comp_wl_gl_init(E_Comp_Wl_Data *comp_wl)
    evas_gl->glsfc = sfc;
    evas_gl->glctx = ctx;
 
-   comp_wl->evas_gl = evas_gl;
+   e_comp_wl->evas_gl = evas_gl;
 
    /* for native surface */
-   comp->gl = 1;
+   e_comp->gl = 1;
 
    e_main_ts_end("\tE_Comp_Wl_GL Init Done");
 
@@ -3651,29 +3578,22 @@ _e_comp_wl_ds_log_handler(enum ds_log_level level, const char *fmt, va_list args
 static E_Comp_Wl_Data *
 _e_comp_wl_display_create(void)
 {
-   E_Comp *comp;
-   E_Comp_Data *comp_data;
+   E_Comp_Data *comp;
    E_Comp_Wl_Data *comp_wl;
    const char *name;
    int fd = 0;
    Eina_Bool res;
 
-   if (!(comp = e_comp_get()))
-     {
-        ERR("e_comp is not exist");
-        return NULL;
-     }
-
    /* create new compositor data */
-   if (!(comp_data = E_NEW(E_Comp_Data, 1)))
+   if (!(comp = E_NEW(E_Comp_Data, 1)))
      {
         ERR("Could not create compositor data: %m");
         return EINA_FALSE;
      }
-   comp_wl = &comp_data->base;
+   comp_wl = &comp->base;
 
    /* set compositor wayland data */
-   e_comp_wl = comp->wl_comp_data = comp_wl;
+   e_comp_wl = e_comp->wl_comp_data = comp_wl;
 
    g_mutex_init(&connection_mutex);
 
@@ -3719,8 +3639,8 @@ _e_comp_wl_display_create(void)
    /* get the file descriptor of the wayland event loop */
    fd = wl_event_loop_get_fd(comp_wl->wl.loop);
 
-   comp_data->client_created.notify = _e_comp_wl_cb_client_created;
-   wl_display_add_client_created_listener(comp_data->base.wl.disp, &comp_data->client_created);
+   comp->client_created.notify = _e_comp_wl_cb_client_created;
+   wl_display_add_client_created_listener(comp->base.wl.disp, &comp->client_created);
 
    // TODO: this function has to move to compmgr module
    if (e_comp_gl_get())
@@ -3745,25 +3665,25 @@ sock_err:
 disp_err:
    g_mutex_clear(&connection_mutex);
    e_comp_wl = NULL;
-   comp->wl_comp_data = NULL;
-   free(comp_data);
+   e_comp->wl_comp_data = NULL;
+   free(comp);
    return NULL;
 }
 
 static void
-_e_comp_wl_gl_shutdown(E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_gl_shutdown(void)
 {
-   if (!comp_wl->evas_gl) return;
+   if (!e_comp_wl->evas_gl) return;
 
-   if (comp_wl->evas_gl->glapi->evasglUnbindWaylandDisplay)
-     comp_wl->evas_gl->glapi->evasglUnbindWaylandDisplay(comp_wl->evas_gl->gl, comp_wl->wl.disp);
+   if (e_comp_wl->evas_gl->glapi->evasglUnbindWaylandDisplay)
+     e_comp_wl->evas_gl->glapi->evasglUnbindWaylandDisplay(e_comp_wl->evas_gl->gl, e_comp_wl->wl.disp);
 
-   evas_gl_make_current(comp_wl->evas_gl->gl, NULL, NULL);
-   evas_gl_context_destroy(comp_wl->evas_gl->gl, comp_wl->evas_gl->glctx);
-   evas_gl_surface_destroy(comp_wl->evas_gl->gl, comp_wl->evas_gl->glsfc);
-   evas_gl_free(comp_wl->evas_gl->gl);
+   evas_gl_make_current(e_comp_wl->evas_gl->gl, NULL, NULL);
+   evas_gl_context_destroy(e_comp_wl->evas_gl->gl, e_comp_wl->evas_gl->glctx);
+   evas_gl_surface_destroy(e_comp_wl->evas_gl->gl, e_comp_wl->evas_gl->glsfc);
+   evas_gl_free(e_comp_wl->evas_gl->gl);
 
-   E_FREE(comp_wl->evas_gl);
+   E_FREE(e_comp_wl->evas_gl);
 }
 
 /* public functions */
@@ -3775,7 +3695,7 @@ _e_comp_wl_gl_shutdown(E_Comp_Wl_Data *comp_wl)
  *
  * @returns true on success, false if initialization failed.
  */
-EINTERN E_Comp_Wl_Data *
+EINTERN Eina_Bool
 e_comp_wl_init(void)
 {
    E_Comp_Wl_Data *comp_wl;
@@ -3787,7 +3707,7 @@ e_comp_wl_init(void)
      {
         e_error_message_show(_("Enlightenment cannot create a Wayland Compositor!\n"));
         TRACE_DS_END();
-        return NULL;
+        return EINA_FALSE;
      }
 
    //TODO: this is not to crate subsurface resource.
@@ -3797,7 +3717,7 @@ e_comp_wl_init(void)
         ERR("Failed to init_subsurfaces");
         e_comp_wl_subsurfaces_shutdown();
         TRACE_DS_END();
-        return NULL;
+        return EINA_FALSE;
      }
 
    // TODO: this does not belong to server mdoule
@@ -3827,34 +3747,39 @@ e_comp_wl_init(void)
 
    TRACE_DS_END();
 
-   return comp_wl;
+   return EINA_TRUE;
+}
+
+EINTERN void
+e_comp_wl_deferred_job(void)
+{
+   ecore_idle_enterer_add(_e_comp_wl_gl_idle, NULL);
 }
 
 /* internal functions */
 EINTERN void
 e_comp_wl_shutdown(void)
 {
-   E_Comp* comp = e_comp_get();
-   E_Comp_Data *comp_data = (E_Comp_Data *)e_comp_wl;
+   E_Comp_Data *comp = (E_Comp_Data *)e_comp_wl;
 
    e_comp_wl_subsurfaces_shutdown();
    /* free handlers */
    E_FREE_LIST(handlers, ecore_event_handler_del);
    E_FREE_LIST(hooks, e_client_hook_del);
-   _e_comp_wl_gl_shutdown(&comp_data->base);
+   _e_comp_wl_gl_shutdown();
 
    e_comp_wl_capture_shutdown();
 
-   wl_list_remove(&comp_data->client_created.link);
+   wl_list_remove(&comp->client_created.link);
 
    /* delete awake handler */
    ecore_main_awake_handler_del(_e_comp_wl_cb_awake);
 
-   wl_display_destroy(comp_data->base.wl.disp);
+   wl_display_destroy(comp->base.wl.disp);
 
    e_comp_wl = NULL;
-   if (comp) comp->wl_comp_data = NULL;
-   free(comp_data);
+   e_comp->wl_comp_data = NULL;
+   free(comp);
 }
 
 EINTERN E_Comp_Wl_Data *
@@ -3863,12 +3788,6 @@ e_comp_wl_get(void)
    return e_comp_wl;
 }
 
-EINTERN void
-e_comp_wl_deferred_job(void)
-{
-   ecore_idle_enterer_add(_e_comp_wl_gl_idle, NULL);
-}
-
 static void
 e_comp_wl_surface_event_simple_free(void *d EINA_UNUSED, E_Event_Client *ev)
 {
@@ -3935,13 +3854,12 @@ e_comp_wl_surface_commit(E_Client *ec)
         /* ignore cursor changes during resize/move I guess */
         if (!e_client_action_get())
           {
-             E_Pointer *comp_pointer = e_comp_pointer_get();
-             if (comp_pointer)
+             if (e_comp->pointer)
                {
-                  x = comp_pointer->hot.x;
-                  y = comp_pointer->hot.y;
-                  e_pointer_view_set(comp_pointer, e_client_view_get(ec), x, y);
+                  x = e_comp->pointer->hot.x;
+                  y = e_comp->pointer->hot.y;
                }
+             e_pointer_view_set(e_comp->pointer, e_client_view_get(ec), x, y);
           }
      }
    return EINA_TRUE;
@@ -3990,14 +3908,11 @@ e_comp_wl_output_init(const char *id, const char *make, const char *model,
                       unsigned int transform)
 {
    E_Comp_Wl_Output *output;
-   E_Comp_Wl_Data *comp_wl;
    Eina_List *l2;
    struct wl_resource *resource;
 
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-
    /* retrieve named output; or create it if it doesn't exist */
-   output = _e_comp_wl_output_get(comp_wl->outputs, id);
+   output = _e_comp_wl_output_get(e_comp_wl->outputs, id);
    if (!output)
      {
         if (!(output = E_NEW(E_Comp_Wl_Output, 1))) return EINA_FALSE;
@@ -4012,10 +3927,10 @@ e_comp_wl_output_init(const char *id, const char *make, const char *model,
         else
           output->model = eina_stringshare_add("unknown");
 
-        comp_wl->outputs = eina_list_append(comp_wl->outputs, output);
+        e_comp_wl->outputs = eina_list_append(e_comp_wl->outputs, output);
 
         output->global =
-          wl_global_create(comp_wl->wl.disp, &wl_output_interface,
+          wl_global_create(e_comp_wl->wl.disp, &wl_output_interface,
                            2, output, _e_comp_wl_cb_output_bind);
 
         output->resources = NULL;
@@ -4064,14 +3979,11 @@ EINTERN void
 e_comp_wl_output_remove(const char *id)
 {
    E_Comp_Wl_Output *output;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-
-   output = _e_comp_wl_output_get(comp_wl->outputs, id);
+   output = _e_comp_wl_output_get(e_comp_wl->outputs, id);
    if (output)
      {
-        comp_wl->outputs = eina_list_remove(comp_wl->outputs, output);
+        e_comp_wl->outputs = eina_list_remove(e_comp_wl->outputs, output);
 
         /* wl_global_destroy(output->global); */
 
@@ -4092,13 +4004,10 @@ _e_comp_wl_key_send(Ecore_Event_Key *ev, E_Device *dev, enum wl_keyboard_key_sta
    struct wl_client *wc = NULL;
    E_Comp_Config *comp_conf = NULL;
    const char *device_name = NULL;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    keycode = (ev->keycode - 8);
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    comp_conf = e_comp_config_get();
 
@@ -4153,17 +4062,20 @@ _e_comp_wl_key_send(Ecore_Event_Key *ev, E_Device *dev, enum wl_keyboard_key_sta
 EINTERN Eina_Bool
 e_comp_wl_key_down(Ecore_Event_Key *ev, E_Device *dev)
 {
-   E_Comp *comp;
    E_Client *ec = NULL;
    uint32_t keycode;
    E_Comp_Wl_Key_Data *end, *k;
 
-   if (ev->window != e_comp_ee_win_get())
+   if (ev->window != e_comp->ee_win)
      {
         return EINA_FALSE;
      }
 
    keycode = (ev->keycode - 8);
+   if (!(e_comp_wl = e_comp->wl_comp_data))
+     {
+        return EINA_FALSE;
+     }
 
 #ifndef E_RELEASE_BUILD
    if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
@@ -4186,13 +4098,10 @@ e_comp_wl_key_down(Ecore_Event_Key *ev, E_Device *dev)
           }
      }
 
-   comp = e_comp_get();
-   if ((!e_client_action_get()) && (comp && !comp->input_key_grabs))
+   if ((!e_client_action_get()) && (!e_comp->input_key_grabs))
      {
-        struct wl_resource *surface;
-
         ec = e_client_focused_get();
-        surface = e_comp_wl_client_surface_get(ec);
+        struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
         if (ec && ec->comp_data && surface)
           {
              if (e_comp_input_key->kbd.focused)
@@ -4225,15 +4134,18 @@ e_comp_wl_key_up(Ecore_Event_Key *ev, E_Device *dev)
    E_Client *ec = NULL;
    uint32_t keycode, delivered_key;
    E_Comp_Wl_Key_Data *end, *k;
-   E_Comp *comp;
 
-   if (ev->window != e_comp_ee_win_get())
+   if (ev->window != e_comp->ee_win)
      {
         return EINA_FALSE;
      }
 
    keycode = (ev->keycode - 8);
    delivered_key = 0;
+   if (!(e_comp_wl = e_comp->wl_comp_data))
+     {
+        return EINA_FALSE;
+     }
 
    end = (E_Comp_Wl_Key_Data *)e_comp_input_key->kbd.keys.data + (e_comp_input_key->kbd.keys.size / sizeof(*k));
    for (k = e_comp_input_key->kbd.keys.data; k < end; k++)
@@ -4249,9 +4161,8 @@ e_comp_wl_key_up(Ecore_Event_Key *ev, E_Device *dev)
      (const char *)end - (const char *)e_comp_input_key->kbd.keys.data;
 
    /* If a key down event have been sent to clients, send a key up event to client for garantee key event sequence pair. (down/up) */
-   comp = e_comp_get();
    if ((delivered_key) ||
-       ((!e_client_action_get()) && (comp && !comp->input_key_grabs)))
+       ((!e_client_action_get()) && (!e_comp->input_key_grabs)))
      {
         ec = e_client_focused_get();
 
@@ -4285,16 +4196,15 @@ e_comp_wl_key_process(Ecore_Event_Key *ev, E_Device *dev, int type)
 }
 
 EINTERN Eina_Bool
-e_comp_wl_evas_handle_mouse_button(E_Client *ec, E_Comp_Wl_Data *comp_wl, uint32_t timestamp, uint32_t button_id, uint32_t state)
+e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state)
 {
    Eina_List *l;
    struct wl_client *wc;
    uint32_t serial, btn;
    struct wl_resource *res;
-   struct wl_resource *surface;
 
    if (ec->cur_mouse_action) return EINA_FALSE;
-   if (comp_wl->drag)
+   if (e_comp_wl->drag)
      {
         ELOGF("Mouse", "Button %s ignored. dragging. (btn: %d, time: %d)", ec, (state ? "Down" : "Up"), button_id, timestamp);
         return EINA_FALSE;
@@ -4310,16 +4220,17 @@ e_comp_wl_evas_handle_mouse_button(E_Client *ec, E_Comp_Wl_Data *comp_wl, uint32
       default: btn = button_id;  break;
      }
 
-   comp_wl->ptr.button = btn;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   e_comp_wl->ptr.button = btn;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   if (!surface) return EINA_FALSE;
 
-   if (!eina_list_count(comp_wl->ptr.resources))
+   if (!eina_list_count(e_comp_wl->ptr.resources))
      return EINA_TRUE;
 
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
         if (!e_comp_wl_input_pointer_check(res)) continue;
@@ -4336,10 +4247,7 @@ e_comp_wl_evas_handle_mouse_button(E_Client *ec, E_Comp_Wl_Data *comp_wl, uint32
 E_API void
 e_comp_wl_touch_cancel(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (comp_wl)
-     _e_comp_wl_touch_cancel(comp_wl);
+   _e_comp_wl_touch_cancel();
 }
 
 ///////////////////////////////////////////////////////////
@@ -4832,34 +4740,30 @@ e_comp_wl_shell_surface_ready(E_Client *ec)
 E_API void
 e_comp_wl_input_cursor_timer_enable_set(Eina_Bool enabled)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
-
    e_config->use_cursor_timer = !!enabled;
 
    if (e_config->use_cursor_timer)
      {
-        if (!e_pointer_is_hidden(e_comp_pointer_get()))
+        if (!e_pointer_is_hidden(e_comp->pointer))
           {
-             _e_comp_wl_cursor_move_timer_control(comp_wl->ptr.ec, comp_wl);
+             _e_comp_wl_cursor_move_timer_control(e_comp_wl->ptr.ec);
           }
      }
    else
      {
-        if (comp_wl->ptr.hide_tmr)
+        if (e_comp_wl->ptr.hide_tmr)
           {
-             ecore_timer_del(comp_wl->ptr.hide_tmr);
-             comp_wl->ptr.hide_tmr = NULL;
+             ecore_timer_del(e_comp_wl->ptr.hide_tmr);
+             e_comp_wl->ptr.hide_tmr = NULL;
           }
         cursor_timer_ec = NULL;
 
-        if (comp_wl->ptr.ec && comp_wl->ptr.ec->has_cursor_unset)
+        if (e_comp_wl->ptr.ec && e_comp_wl->ptr.ec->has_cursor_unset)
           return;
 
-        if (e_pointer_is_hidden(e_comp_pointer_get()))
+        if (e_pointer_is_hidden(e_comp->pointer))
           {
-             _e_comp_wl_cursor_reload(comp_wl, comp_wl->ptr.ec);
+             _e_comp_wl_cursor_reload(e_comp_wl->ptr.ec);
           }
      }
 }
@@ -4892,19 +4796,19 @@ e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, void *dev, uint
    enum wl_keyboard_key_state state;
    E_Comp_Config *comp_conf = NULL;
    const char *dev_name = NULL;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    wl_keycode = keycode - 8;
    EINA_SAFETY_ON_TRUE_RETURN_VAL(wl_keycode <= 0, EINA_FALSE);
 
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    if (!time) time = e_util_timestamp_get();
    if (pressed) state = WL_KEYBOARD_KEY_STATE_PRESSED;
    else state = WL_KEYBOARD_KEY_STATE_RELEASED;
@@ -4932,7 +4836,7 @@ e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool pressed, void *dev, uint
                }
              else
                {
-                  _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_KEYBOARD, time);
+                  _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_KEYBOARD, time);
                }
           }
         else
@@ -4970,19 +4874,18 @@ e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time
    uint32_t serial, wl_keycode, cancel_keycode;
    E_Comp_Config *comp_conf = NULL;
    struct xkb_keymap *keymap = NULL;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
 
    g_rec_mutex_lock(&e_comp_input_key->xkb.keymap_mutex);
    keymap = e_comp_input_key->xkb.keymap;
    g_rec_mutex_unlock(&e_comp_input_key->xkb.keymap_mutex);
    EINA_SAFETY_ON_NULL_RETURN_VAL(keymap, EINA_FALSE);
 
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    cancel_keycode = e_comp_wl_input_keymap_keyname_to_keycode("Cancel");
    if (cancel_keycode == XKB_KEYCODE_INVALID)
@@ -4999,7 +4902,7 @@ e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time
    EINA_SAFETY_ON_TRUE_RETURN_VAL(wl_keycode <= 0, EINA_FALSE);
 
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    if (!time) time = e_util_timestamp_get();
 
    comp_conf = e_comp_config_get();
@@ -5011,7 +4914,7 @@ e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time
      {
         if (wl_resource_get_client(res) != wc) continue;
         if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
-        else _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_KEYBOARD, time);
+        else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_KEYBOARD, time);
 
         if (comp_conf && comp_conf->input_log_enable)
           ELOGF("Key", "Send Key Cancel (time: %d)", ec, time);
@@ -5027,15 +4930,15 @@ e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time
 }
 
 EINTERN E_Client*
-e_comp_wl_touch_frame_send_ec_get(E_Comp_Wl_Data *comp_wl)
+e_comp_wl_touch_frame_send_ec_get(void)
 {
-   return comp_wl->touch.frame_ec;
+   return e_comp_wl->touch.frame_ec;
 }
 
 EINTERN void
-e_comp_wl_touch_frame_send_ec_set(E_Comp_Wl_Data *comp_wl, E_Client *ec)
+e_comp_wl_touch_frame_send_ec_set(E_Client *ec)
 {
-   comp_wl->touch.frame_ec = ec;
+   e_comp_wl->touch.frame_ec = ec;
 }
 
 EINTERN Eina_Bool
@@ -5044,19 +4947,19 @@ e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Eco
    struct wl_client *wc;
    uint32_t serial;
    E_Devicemgr_Input_Device *device = NULL;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
 
    wc = wl_resource_get_client(surface);
    if (!time) time = e_util_timestamp_get();
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    if (dev)
      {
@@ -5065,14 +4968,14 @@ e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Eco
      }
    else if (device)
      {
-        _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_TOUCH, time);
+        _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_TOUCH, time);
         _e_comp_wl_device_handle_axes(device->identifier, device->clas, ec, idx, radius_x, radius_y, pressure, angle);
      }
 
    x = x + ec->client.x;
    y = y + ec->client.y;
 
-   _e_comp_wl_send_touch(ec, comp_wl, idx, x, y, time, pressed);
+   _e_comp_wl_send_touch(ec, idx, x, y, time, pressed);
 
    return EINA_TRUE;
 }
@@ -5083,19 +4986,19 @@ e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *d
    E_Devicemgr_Input_Device *device;
    uint32_t serial;
    struct wl_client *wc;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    if (!dev) device = _e_comp_wl_device_last_device_get(ECORE_DEVICE_CLASS_TOUCH);
 
    wc = wl_resource_get_client(surface);
    if (!time) time = e_util_timestamp_get();
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    if (dev)
      {
@@ -5104,14 +5007,14 @@ e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *d
      }
    else if (device)
      {
-        _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_TOUCH, time);
+        _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_TOUCH, time);
         _e_comp_wl_device_handle_axes(device->identifier, device->clas, ec, idx, radius_x, radius_y, pressure, angle);
      }
 
    x = x + ec->client.x;
    y = y + ec->client.y;
 
-   _e_comp_wl_send_touch_move(ec, comp_wl, idx, x, y, time);
+   _e_comp_wl_send_touch_move(ec, idx, x, y, time);
 
    return EINA_TRUE;
 }
@@ -5121,6 +5024,7 @@ e_comp_wl_touch_cancel_send(E_Client *ec)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
 
    _e_comp_wl_send_touch_cancel(ec);
 
@@ -5132,26 +5036,26 @@ e_comp_wl_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Ecore_
 {
    uint32_t serial;
    struct wl_client *wc;
-   E_Comp_Wl_Data *comp_wl;
-   struct wl_resource *surface;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    wc = wl_resource_get_client(surface);
    if (!time) time = e_util_timestamp_get();
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
-   else _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_MOUSE, time);
+   else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
 
    if (pressed)
-     e_comp_wl_evas_handle_mouse_button(ec, comp_wl, time, buttons,
+     e_comp_wl_evas_handle_mouse_button(ec, time, buttons,
                                           WL_POINTER_BUTTON_STATE_PRESSED);
    else
-     e_comp_wl_evas_handle_mouse_button(ec, comp_wl, time, buttons,
+     e_comp_wl_evas_handle_mouse_button(ec, time, buttons,
                                           WL_POINTER_BUTTON_STATE_RELEASED);
 
    return EINA_TRUE;
@@ -5162,25 +5066,25 @@ e_comp_wl_mouse_move_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_
 {
    uint32_t serial;
    struct wl_client *wc;
-   struct wl_resource *surface;
-   E_Comp_Wl_Data *comp_wl;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    wc = wl_resource_get_client(surface);
    if (!time) time = e_util_timestamp_get();
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
-   else _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_MOUSE, time);
+   else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
 
    x = x + ec->client.x;
    y = y + ec->client.y;
 
-   _e_comp_wl_send_mouse_move(ec, comp_wl, x, y, time);
+   _e_comp_wl_send_mouse_move(ec, x, y, time);
 
    return EINA_TRUE;
 }
@@ -5190,33 +5094,33 @@ e_comp_wl_mouse_wheel_send(E_Client *ec, int direction, int z, Ecore_Device *dev
 {
    uint32_t serial;
    struct wl_client *wc;
-   struct wl_resource *surface;
-   E_Comp_Wl_Data *comp_wl;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    wc = wl_resource_get_client(surface);
    if (!time) time = e_util_timestamp_get();
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    if (_e_comp_wl_check_cursor_timer_needed(ec))
       {
-         if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec, comp_wl))
+         if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, ec))
            return EINA_TRUE;
       }
 
    if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
-   else _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_MOUSE, time);
+   else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
 
-   _e_comp_wl_mouse_wheel_send(ec, comp_wl, direction, z, time);
+   _e_comp_wl_mouse_wheel_send(ec, direction, z, time);
 
    if (!need_send_released) // set cursor's hide_tmr only when mouse button is not pressed
      {
         if (_e_comp_wl_check_cursor_timer_needed(ec))
-          _e_comp_wl_cursor_move_timer_control(ec, comp_wl);
+          _e_comp_wl_cursor_move_timer_control(ec);
      }
 
    return EINA_TRUE;
@@ -5229,32 +5133,33 @@ e_comp_wl_mouse_in_send(E_Client *ec, int x, int y, Ecore_Device *dev, uint32_t
    struct wl_client *wc;
    struct wl_resource *res;
    Eina_List *l;
-   struct wl_resource *surface;
-   E_Comp_Wl_Data *comp_wl;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
 
-   if (!eina_list_count(comp_wl->ptr.resources)) return EINA_FALSE;
+   if (!eina_list_count(e_comp_wl->ptr.resources)) return EINA_FALSE;
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
 
         if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
-        else _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_MOUSE, time);
+        else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
 
         wl_pointer_send_enter(res, serial, surface,
                               wl_fixed_from_int(x),
                               wl_fixed_from_int(y));
         ec->pointer_enter_sent = EINA_TRUE;
      }
-   wl_signal_emit(&comp_wl->ptr_constraints.surface_mousein_signal, ec);
+   wl_signal_emit(&e_comp_wl->ptr_constraints.surface_mousein_signal, ec);
 
    return EINA_TRUE;
 }
@@ -5266,29 +5171,29 @@ e_comp_wl_mouse_out_send(E_Client *ec, Ecore_Device *dev, uint32_t time)
    struct wl_client *wc;
    struct wl_resource *res;
    Eina_List *l;
-   struct wl_resource *surface;
-   E_Comp_Wl_Data *comp_wl;
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), EINA_FALSE);
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
 
+   if (!eina_list_count(e_comp_wl->ptr.resources)) return EINA_FALSE;
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
 
         if (dev) _e_comp_wl_send_event_device(wc, time, dev, serial);
-        else _e_comp_wl_device_send_last_event_device(ec, comp_wl, ECORE_DEVICE_CLASS_MOUSE, time);
+        else _e_comp_wl_device_send_last_event_device(ec, ECORE_DEVICE_CLASS_MOUSE, time);
 
         wl_pointer_send_leave(res, serial, surface);
         ec->pointer_enter_sent = EINA_FALSE;
      }
-   wl_signal_emit(&comp_wl->ptr_constraints.surface_mouseout_signal, ec);
+   wl_signal_emit(&e_comp_wl->ptr_constraints.surface_mouseout_signal, ec);
 
    return EINA_TRUE;
 }
@@ -5354,26 +5259,24 @@ e_comp_wl_cursor_hide(E_Client *ec)
    struct wl_client *wc;
    Eina_List *l;
    uint32_t serial;
-   struct wl_resource *surface;
-   E_Comp_Wl_Data *comp_wl;
 
-   e_pointer_view_set(e_comp_pointer_get(), NULL, 0, 0);
+   e_pointer_view_set(e_comp->pointer, NULL, 0, 0);
 
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (comp_wl->ptr.hide_tmr)
+   if (e_comp_wl->ptr.hide_tmr)
      {
-        ecore_timer_del(comp_wl->ptr.hide_tmr);
-        comp_wl->ptr.hide_tmr = NULL;
+        ecore_timer_del(e_comp_wl->ptr.hide_tmr);
+        e_comp_wl->ptr.hide_tmr = NULL;
      }
    cursor_timer_ec = NULL;
 
    if (!ec) return EINA_FALSE;
    if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
-   if (!(surface = e_comp_wl_client_surface_get(ec))) return EINA_FALSE;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
    wc = wl_resource_get_client(surface);
-   serial = wl_display_next_serial(comp_wl->wl.disp);
-   EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
+   EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
      {
         if (!e_comp_wl_input_pointer_check(res)) continue;
         if (wl_resource_get_client(res) != wc) continue;
@@ -5546,12 +5449,10 @@ e_comp_wl_output_find(E_Client *ec)
 {
    Eina_List *l;
    E_Comp_Wl_Output *output;
-   E_Comp_Wl_Data *comp_wl;
 
    if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec))) return NULL;
-   if (!(comp_wl = e_comp_wl_get())) return NULL;
 
-   EINA_LIST_FOREACH(comp_wl->outputs, l, output)
+   EINA_LIST_FOREACH(e_comp_wl->outputs, l, output)
      {
         if (output->transform % 2)
           {
@@ -5575,19 +5476,17 @@ e_comp_wl_output_find(E_Client *ec)
 EINTERN Eina_Array *
 e_comp_wl_output_find_all(E_Client *ec)
 {
-   E_Comp_Wl_Data* comp_wl;
    E_Comp_Wl_Output *output;
    Eina_Array *outputs;
    Eina_List *l;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
-   if (!(comp_wl = e_comp_wl_get())) return NULL;
 
    outputs = eina_array_new(4);
    if (!outputs)
      return NULL;
 
-   EINA_LIST_FOREACH(comp_wl->outputs, l, output)
+   EINA_LIST_FOREACH(e_comp_wl->outputs, l, output)
      {
         if (E_INTERSECTS(ec->x, ec->y, ec->w, ec->h,
                          output->x, output->y, output->w, output->h))
@@ -5824,12 +5723,10 @@ err:
 EINTERN Eina_Bool
 e_comp_wl_move_resize_init(void)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-   if (!comp_wl->wl.disp) return EINA_FALSE;
+   if (!e_comp_wl) return EINA_FALSE;
+   if (!e_comp_wl->wl.disp) return EINA_FALSE;
 
-   if (!wl_global_create(comp_wl->wl.disp,
+   if (!wl_global_create(e_comp_wl->wl.disp,
                          &tizen_move_resize_interface,
                          1,
                          NULL,
@@ -5850,20 +5747,18 @@ e_comp_wl_move_resize_shutdown(void)
 EINTERN Eina_Bool
 e_comp_wl_pid_output_configured_resolution_send(pid_t pid, int w, int h)
 {
-   E_Comp_Wl_Data *comp_wl;
    E_Comp_Wl_Output *output;
    pid_t output_pid = 0;
    Eina_List *l = NULL, *l2 = NULL;
    struct wl_resource *resource = NULL;
 
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
    if (!e_config->configured_output_resolution.use) return EINA_TRUE;
 
    EINA_SAFETY_ON_TRUE_RETURN_VAL(pid <= 0, EINA_FALSE);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(w < 0, EINA_FALSE);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(h < 0, EINA_FALSE);
 
-   EINA_LIST_FOREACH(comp_wl->outputs, l, output)
+   EINA_LIST_FOREACH(e_comp_wl->outputs, l, output)
      {
         /* if we have bound resources, send updates */
         EINA_LIST_FOREACH(output->resources, l2, resource)
@@ -6404,19 +6299,15 @@ e_comp_wl_client_subsurface_cyclic_reference_check(E_Client *ec, E_Client *paren
 E_API struct wl_display *
 e_comp_wl_display_get(void)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return NULL;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, NULL);
 
-   return comp_wl->wl.disp;
+   return e_comp_wl->wl.disp;
 }
 
 E_API E_Client *
 e_comp_wl_ptr_ec_get(void)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return NULL;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, NULL);
 
-   return comp_wl->ptr.ec;
+   return e_comp_wl->ptr.ec;
 }
index f417b70c2d68ef4190cb21c696cafb04c501243a..74b419b225e8e8705038922f916fd4c6127fff65 100644 (file)
@@ -1169,7 +1169,6 @@ _e_capture_client_child_data_create(Thread_Data *td, E_Client *ec)
 {
    E_Capture_Client *ecc;
    Capture_Data *capture_data;
-   E_Comp_Wl_Data *comp_wl;
 
    E_Comp_Wl_Buffer *buffer = NULL;
    struct wl_shm_buffer *shm_buffer;
@@ -1233,10 +1232,7 @@ _e_capture_client_child_data_create(Thread_Data *td, E_Client *ec)
 
       case E_COMP_WL_BUFFER_TYPE_NATIVE:
       case E_COMP_WL_BUFFER_TYPE_VIDEO:
-         comp_wl = e_comp_wl_get();
-         if (!comp_wl) goto end;
-
-         tbm_surface = wayland_tbm_server_get_surface(comp_wl->tbm.server, buffer->resource);
+         tbm_surface = wayland_tbm_server_get_surface(e_comp_wl->tbm.server, buffer->resource);
          if (!tbm_surface) goto end;
 
          capture_data->tbm_surface = e_comp_wl_tbm_capturable_buffer_get(tbm_surface);
@@ -1528,7 +1524,6 @@ _e_capture_client_save(E_Capture_Client *ecc,
                              Eina_Bool skip_child)
 {
    E_Client *ec;
-   E_Comp_Wl_Data *comp_wl;
    E_Comp_Wl_Buffer *buffer = NULL;
    Thread_Data *td;
    struct wl_shm_buffer *shm_buffer;
@@ -1584,10 +1579,7 @@ _e_capture_client_save(E_Capture_Client *ecc,
          break;
       case E_COMP_WL_BUFFER_TYPE_NATIVE:
       case E_COMP_WL_BUFFER_TYPE_VIDEO:
-         comp_wl = e_comp_wl_get();
-         if (!comp_wl) goto end;
-
-         tbm_surface = wayland_tbm_server_get_surface(comp_wl->tbm.server, buffer->resource);
+         tbm_surface = wayland_tbm_server_get_surface(e_comp_wl->tbm.server, buffer->resource);
          if (!tbm_surface) goto end;
          if (!_e_capture_client_tbm_surface_valid_check(tbm_surface)) goto end;
 
index 473b32ce6ca851ce7bdda4bc525a7d68552c5bb9..3a667248ab172e222caef4ba6973e9cd9ad4e18a 100644 (file)
@@ -33,15 +33,12 @@ static void
 _e_comp_wl_data_offer_cb_accept(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t serial, const char *mime_type)
 {
    E_Comp_Wl_Data_Offer *offer;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    DBG("Data Offer Accept");
    if (!(offer = wl_resource_get_user_data(resource)))
      return;
 
-   if (offer->source && comp_wl->drag_offer == offer)
+   if (offer->source && e_comp_wl->drag_offer == offer)
      {
         offer->source->target(offer->source, serial, mime_type);
         offer->source->accepted = !!mime_type;
@@ -236,12 +233,11 @@ static void
 _e_comp_wl_data_source_notify_finish(E_Comp_Wl_Data_Source *source)
 {
    E_Comp_Wl_Data_Offer *drag_offer;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!source->actions_set) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
+   if (!source->actions_set)
+     return;
 
-   drag_offer = comp_wl->drag_offer;
+   drag_offer = e_comp_wl->drag_offer;
 
    if (drag_offer && drag_offer->in_ask &&
        wl_resource_get_version(source->resource) >= WL_DATA_SOURCE_ACTION_SINCE_VERSION)
@@ -254,7 +250,7 @@ _e_comp_wl_data_source_notify_finish(E_Comp_Wl_Data_Source *source)
         wl_data_source_send_dnd_finished(source->resource);
      }
 
-   comp_wl->drag_offer = NULL;
+   e_comp_wl->drag_offer = NULL;
 }
 
 static uint32_t
@@ -361,10 +357,9 @@ static void
 _e_comp_wl_data_offer_cb_resource_destroy(struct wl_resource *resource)
 {
    E_Comp_Wl_Data_Offer *offer;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(offer = wl_resource_get_user_data(resource))) return;
+   if (!(offer = wl_resource_get_user_data(resource)))
+     return;
 
    if (offer->drag_enter)
      wl_list_remove(&offer->ec_destroy_listener.link);
@@ -386,12 +381,12 @@ _e_comp_wl_data_offer_cb_resource_destroy(struct wl_resource *resource)
 
         if (wl_resource_get_version(offer->resource) < WL_DATA_OFFER_ACTION_SINCE_VERSION)
           _e_comp_wl_data_source_notify_finish(offer->source);
-        else if (offer->dropped && offer->source != comp_wl->drag_source)
+        else if (offer->dropped && offer->source != e_comp_wl->drag_source)
           _e_comp_wl_data_source_cancelled_send(offer->source);
      }
 
-   if (offer == comp_wl->drag_offer)
-     comp_wl->drag_offer = NULL;
+   if (offer == e_comp_wl->drag_offer)
+     e_comp_wl->drag_offer = NULL;
 
    if ((offer->th != NULL) && !ecore_thread_check(offer->th))
      {
@@ -532,18 +527,17 @@ static void
 _e_comp_wl_data_source_cb_resource_destroy(struct wl_resource *resource)
 {
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(source = wl_resource_get_user_data(resource))) return;
+   if (!(source = wl_resource_get_user_data(resource)))
+     return;
 
    wl_signal_emit(&source->destroy_signal, source);
 
-   if (comp_wl->drag_source == source)
+   if (e_comp_wl->drag_source == source)
      {
-        comp_wl->drag_source = NULL;
+        e_comp_wl->drag_source = NULL;
         e_comp_override_del();
-        e_drag_end(comp_wl->drag, E_DND_DRAG_TYPE_CANCELLED);
+        e_drag_end(e_comp_wl->drag, E_DND_DRAG_TYPE_CANCELLED);
      }
 
    _mime_types_free(source);
@@ -614,22 +608,21 @@ _e_comp_wl_data_device_destroy_selection_data_source(struct wl_listener *listene
    E_Comp_Wl_Data_Source *source;
    struct wl_resource *data_device_res = NULL, *focus = NULL;
    struct wl_client *source_client, *cbhm_client = NULL;
-   E_Comp_Wl_Data *comp_wl;
 
    DBG("Data Device Destroy Selection Source");
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!(source = (E_Comp_Wl_Data_Source*)data)) return;
+   if (!(source = (E_Comp_Wl_Data_Source*)data))
+     return;
 
-   comp_wl->selection.data_source = NULL;
+   e_comp_wl->selection.data_source = NULL;
 
    source_client = wl_resource_get_client(source->resource);
-   if (comp_wl->selection.cbhm)
-     cbhm_client =  wl_resource_get_client(comp_wl->selection.cbhm);
+   if (e_comp_wl->selection.cbhm)
+     cbhm_client =  wl_resource_get_client(e_comp_wl->selection.cbhm);
 
    if ((cbhm_client) && (source_client != cbhm_client))
      {
         data_device_res =
-           e_comp_wl_data_find_for_client(wl_resource_get_client(comp_wl->selection.cbhm));
+           e_comp_wl_data_find_for_client(wl_resource_get_client(e_comp_wl->selection.cbhm));
 
         if (data_device_res)
           wl_data_device_send_selection(data_device_res, NULL);
@@ -649,16 +642,16 @@ _e_comp_wl_data_device_destroy_selection_data_source(struct wl_listener *listene
           wl_data_device_send_selection(data_device_res, NULL);
      }
 
-   if (comp_wl->selection.data_only_list)
+   if (e_comp_wl->selection.data_only_list)
      {
         struct wl_resource *data_only;
         Eina_List *l;
 
-        EINA_LIST_FOREACH(comp_wl->selection.data_only_list, l, data_only)
+        EINA_LIST_FOREACH(e_comp_wl->selection.data_only_list, l, data_only)
            wl_data_device_send_selection(data_only, NULL);
      }
 
-   wl_signal_emit(&comp_wl->selection.signal, comp_wl);
+   wl_signal_emit(&e_comp_wl->selection.signal, e_comp->wl_comp_data);
 }
 
 static struct wl_resource*
@@ -703,7 +696,7 @@ _e_comp_wl_data_device_data_offer_create(E_Comp_Wl_Data_Source *source, struct w
 }
 
 static Eina_Bool
-_e_comp_wl_data_secondary_res_check(struct wl_resource *resource, E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_data_secondary_res_check(struct wl_resource *resource)
 {
    struct wl_resource *surface;
    E_Client *ec;
@@ -712,10 +705,10 @@ _e_comp_wl_data_secondary_res_check(struct wl_resource *resource, E_Comp_Wl_Data
    if (resource == NULL)
      return EINA_FALSE;
 
-   if (comp_wl->selection.secondary_list == NULL)
+   if (e_comp_wl->selection.secondary_list == NULL)
      return EINA_FALSE;
 
-   EINA_LIST_FOREACH(comp_wl->selection.secondary_list, l, ec)
+   EINA_LIST_FOREACH(e_comp_wl->selection.secondary_list, l, ec)
      {
         surface = e_comp_wl_client_surface_get(ec);
         if (!surface) continue;
@@ -728,20 +721,20 @@ _e_comp_wl_data_secondary_res_check(struct wl_resource *resource, E_Comp_Wl_Data
 }
 
 static void
-_e_comp_wl_data_secondary_send(E_Comp_Wl_Data_Source *source, E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_data_secondary_send(E_Comp_Wl_Data_Source *source)
 {
    struct wl_client *secondary_client;
    struct wl_resource *surface, *offer_res, *data_device_res;
    E_Client *ec;
    Eina_List *l;
 
-   EINA_LIST_FOREACH(comp_wl->selection.secondary_list, l, ec)
+   EINA_LIST_FOREACH(e_comp_wl->selection.secondary_list, l, ec)
      {
         surface = e_comp_wl_client_surface_get(ec);
         if (!surface) continue;
 
-        if ((comp_wl->selection.secondary_sent != NULL) &&
-            (wl_resource_get_client(surface) == wl_resource_get_client(comp_wl->selection.secondary_sent)))
+        if ((e_comp_wl->selection.secondary_sent != NULL) &&
+            (wl_resource_get_client(surface) == wl_resource_get_client(e_comp_wl->selection.secondary_sent)))
           continue;
 
         secondary_client = wl_resource_get_client(surface);
@@ -766,52 +759,52 @@ _e_comp_wl_data_secondary_send(E_Comp_Wl_Data_Source *source, E_Comp_Wl_Data *co
           wl_data_device_send_selection(data_device_res, NULL);
      }
 
-   comp_wl->selection.secondary_sent = NULL;
+   e_comp_wl->selection.secondary_sent = NULL;
 }
 
 static void
-_e_comp_wl_data_device_selection_set(E_Comp_Wl_Data_Source *source, E_Comp_Wl_Data *comp_wl, uint32_t serial)
+_e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Source *source, uint32_t serial)
 {
    E_Comp_Wl_Data_Source *sel_source;
    struct wl_resource *offer_res, *data_device_res, *focus = NULL;
    struct wl_client *source_client = NULL, *sel_client = NULL, *cbhm_client = NULL;
 
-   sel_source = (E_Comp_Wl_Data_Source*)comp_wl->selection.data_source;
+   sel_source = (E_Comp_Wl_Data_Source*)e_comp_wl->selection.data_source;
 
    if ((source) && (source->resource))
      source_client = wl_resource_get_client(source->resource);
    if ((sel_source) && (sel_source->resource))
      sel_client = wl_resource_get_client(sel_source->resource);
-   if (comp_wl->selection.cbhm)
-     cbhm_client = wl_resource_get_client(comp_wl->selection.cbhm);
+   if (e_comp_wl->selection.cbhm)
+     cbhm_client = wl_resource_get_client(e_comp_wl->selection.cbhm);
 
    if ((sel_source) &&
        (sel_client == source_client) &&
        (sel_client != cbhm_client) &&
-       (comp_wl->selection.serial - serial < UINT32_MAX / 2))
+       (e_comp_wl->selection.serial - serial < UINT32_MAX / 2))
      {
         /* TODO: elm_entry is sending too many request on now,
          * for those requests, selection.signal is being emitted also a lot.
          * when it completes to optimize the entry, it should be checked more.
          */
-        if (comp_wl->clipboard.source)
-          wl_signal_emit(&comp_wl->selection.signal, comp_wl);
+        if (e_comp_wl->clipboard.source)
+          wl_signal_emit(&e_comp_wl->selection.signal, e_comp->wl_comp_data);
 
         return;
      }
 
    if (sel_source)
      {
-        if (!comp_wl->clipboard.xwl_owner)
-          wl_list_remove(&comp_wl->selection.data_source_listener.link);
+        if (!e_comp_wl->clipboard.xwl_owner)
+          wl_list_remove(&e_comp_wl->selection.data_source_listener.link);
         if (sel_source->cancelled)
           sel_source->cancelled(sel_source);
-        comp_wl->selection.data_source = NULL;
+        e_comp_wl->selection.data_source = NULL;
      }
 
-   comp_wl->selection.data_source = sel_source = source;
-   comp_wl->clipboard.xwl_owner = NULL;
-   comp_wl->selection.serial = serial;
+   e_comp_wl->selection.data_source = sel_source = source;
+   e_comp_wl->clipboard.xwl_owner = NULL;
+   e_comp_wl->selection.serial = serial;
 
    if (e_comp_input_key->kbd.enabled)
      focus = e_comp_input_key->kbd.focus;
@@ -825,15 +818,15 @@ _e_comp_wl_data_device_selection_set(E_Comp_Wl_Data_Source *source, E_Comp_Wl_Da
              offer_res = _e_comp_wl_data_device_data_offer_create(source, data_device_res);
              wl_data_device_send_selection(data_device_res, offer_res);
 
-             if (_e_comp_wl_data_secondary_res_check(source->resource, comp_wl) == EINA_TRUE)
-               comp_wl->selection.secondary_sent = source->resource;
+             if (_e_comp_wl_data_secondary_res_check(source->resource) == EINA_TRUE)
+               e_comp_wl->selection.secondary_sent = source->resource;
           }
      }
    else
      {
         /* send wl_data_device@selection to secondary selection client */
-        if (comp_wl->selection.secondary_list != NULL)
-          _e_comp_wl_data_secondary_send(source, comp_wl);
+        if (e_comp_wl->selection.secondary_list != NULL)
+          _e_comp_wl_data_secondary_send(source);
 
         /* send wl_data_device@selection to focused client */
         if (focus)
@@ -854,12 +847,12 @@ _e_comp_wl_data_device_selection_set(E_Comp_Wl_Data_Source *source, E_Comp_Wl_Da
         /* send wl_data_device@selection to data only clients
          * because they won't be focused at all
          */
-        if (comp_wl->selection.data_only_list)
+        if (e_comp_wl->selection.data_only_list)
           {
              struct wl_resource *data_only;
              Eina_List *l;
 
-             EINA_LIST_FOREACH(comp_wl->selection.data_only_list, l, data_only)
+             EINA_LIST_FOREACH(e_comp_wl->selection.data_only_list, l, data_only)
                {
                   if (source)
                     {
@@ -874,55 +867,51 @@ _e_comp_wl_data_device_selection_set(E_Comp_Wl_Data_Source *source, E_Comp_Wl_Da
           }
      }
 
-   wl_signal_emit(&comp_wl->selection.signal, comp_wl);
+   wl_signal_emit(&e_comp_wl->selection.signal, e_comp->wl_comp_data);
 
    if (source)
      {
-        comp_wl->selection.data_source_listener.notify =
+        e_comp_wl->selection.data_source_listener.notify =
           _e_comp_wl_data_device_destroy_selection_data_source;
         wl_signal_add(&source->destroy_signal,
-                      &comp_wl->selection.data_source_listener);
+                      &e_comp_wl->selection.data_source_listener);
      }
 }
 
 static void
 _e_comp_wl_data_device_drag_finished(E_Drag *drag, E_Dnd_Drop_Type type)
 {
-   E_View *view;
-   E_Comp_Wl_Data *comp_wl;
-
-   view = e_view_edje_part_swallow_get(drag->comp_edje, "e.swallow.content");
+   E_View *view = e_view_edje_part_swallow_get(drag->comp_edje, "e.swallow.content");
 
    if (eina_streq(evas_object_type_get(view->eo), "e_comp_object")) //TO DO : use view for type get
      e_view_edje_part_unswallow(drag->comp_edje, view);
    e_view_hide(view);
    e_view_pass_events_set(view, 1);
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (comp_wl->drag != drag) return;
+   if (e_comp_wl->drag != drag) return;
 
-   comp_wl->drag = NULL;
+   e_comp_wl->drag = NULL;
 
-   if (comp_wl->drag_client->visible)
+   if (e_comp_wl->drag_client->visible)
      {
-        comp_wl->drag_client->changes.visible = 1;
-        comp_wl->drag_client->visible = 0;
-        EC_CHANGED(comp_wl->drag_client);
+        e_comp_wl->drag_client->changes.visible = 1;
+        e_comp_wl->drag_client->visible = 0;
+        EC_CHANGED(e_comp_wl->drag_client);
      }
-   comp_wl->drag_client = NULL;
+   e_comp_wl->drag_client = NULL;
 
    e_comp_override_del();
-   if (comp_wl->selection.target)
+   if (e_comp_wl->selection.target)
      {
         struct wl_resource *res = NULL;
         E_Comp_Wl_Data_Source *drag_source;
-        struct wl_resource *surface = e_comp_wl_client_surface_get(comp_wl->selection.target);
+        struct wl_resource *surface = e_comp_wl_client_surface_get(e_comp_wl->selection.target);
         if (surface)
           res = e_comp_wl_data_find_for_client(wl_resource_get_client(surface));
 
         if (res)
           {
-             drag_source = comp_wl->drag_source;
+             drag_source = e_comp_wl->drag_source;
 
              if (drag_source)
                {
@@ -933,7 +922,7 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, E_Dnd_Drop_Type type)
                        wl_data_device_send_drop(res);
                        if (wl_resource_get_version(drag_source->resource) >= WL_DATA_SOURCE_DND_DROP_PERFORMED_SINCE_VERSION)
                          wl_data_source_send_dnd_drop_performed(drag_source->resource);
-                       ((E_Comp_Wl_Data_Offer*)comp_wl->drag_offer)->in_ask = drag_source->current_dnd_action ==
+                       ((E_Comp_Wl_Data_Offer*)e_comp_wl->drag_offer)->in_ask = drag_source->current_dnd_action ==
                            WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK;
                     }
                   else if(wl_resource_get_version(drag_source->resource) >= WL_DATA_SOURCE_DND_FINISHED_SINCE_VERSION)
@@ -941,20 +930,19 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, E_Dnd_Drop_Type type)
                }
              wl_data_device_send_leave(res);
           }
-        comp_wl->selection.target = NULL;
-        comp_wl->drag_source = NULL;
+        e_comp_wl->selection.target = NULL;
+        e_comp_wl->drag_source = NULL;
 
-        if (comp_wl->drag_offer)
-          ((E_Comp_Wl_Data_Offer*)comp_wl->drag_offer)->dropped = EINA_TRUE;
+        if (e_comp_wl->drag_offer)
+          ((E_Comp_Wl_Data_Offer*)e_comp_wl->drag_offer)->dropped = EINA_TRUE;
      }
 
    e_comp_wl_data_current_device_id_set(-1);
 }
 
 static void
-_e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resource *resource, struct wl_resource *source_resource, struct wl_resource *origin_resource, struct wl_resource *icon_resource, uint32_t serial)
+_e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, struct wl_resource *source_resource, struct wl_resource *origin_resource, struct wl_resource *icon_resource, uint32_t serial)
 {
-   E_Comp_Wl_Data *comp_wl;
    E_Comp_Wl_Data_Source *source;
    Eina_List *l;
    struct wl_resource *res;
@@ -963,12 +951,9 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
    E_Desk *desk;
    int x, y;
 
-   comp_wl = wl_resource_get_user_data(resource);
-   if (!comp_wl) return;
-
    DBG("Data Device Drag Start");
 
-   if (comp_wl->drag)
+   if (e_comp_wl->drag)
      {
         ERR("Drag already in progress");
         return;
@@ -977,7 +962,7 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
    if (!(source = wl_resource_get_user_data(source_resource)))
      return;
 
-   comp_wl->drag_source = source;
+   e_comp_wl->drag_source = source;
 
    if (icon_resource)
      {
@@ -995,13 +980,13 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
              EC_CHANGED(drag_icon_ec);
              e_comp_override_add();
           }
-        comp_wl->drag_client = drag_icon_ec;
+        e_comp_wl->drag_client = drag_icon_ec;
      }
 
    ec = e_client_from_surface_resource(origin_resource);
    if (ec && ec->pointer_enter_sent)
      {
-        EINA_LIST_FOREACH(comp_wl->ptr.resources, l, res)
+        EINA_LIST_FOREACH(e_comp_wl->ptr.resources, l, res)
           {
              if (!e_comp_wl_input_pointer_check(res)) continue;
              if (wl_resource_get_client(res) != client) continue;
@@ -1013,16 +998,16 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
         ec->pointer_enter_sent = EINA_FALSE;
      }
 
-   evas_pointer_canvas_xy_get(e_comp_evas_get(), &x, &y);
-   comp_wl->drag = e_drag_new(x, y, _e_comp_wl_data_device_drag_finished);
-   comp_wl->drag->button_mask = evas_pointer_button_down_mask_get(e_comp_evas_get());
+   evas_pointer_canvas_xy_get(e_comp->evas, &x, &y);
+   e_comp_wl->drag = e_drag_new(x, y, _e_comp_wl_data_device_drag_finished);
+   e_comp_wl->drag->button_mask = evas_pointer_button_down_mask_get(e_comp->evas);
    if (drag_icon_ec)
      {
-        e_drag_view_set(comp_wl->drag, e_view_client_view_get(e_client_view_get(drag_icon_ec)));
-        e_drag_reference_point_set(comp_wl->drag, drag_icon_ec->x, drag_icon_ec->y);
-        e_drag_resize(comp_wl->drag, drag_icon_ec->w, drag_icon_ec->h);
+        e_drag_view_set(e_comp_wl->drag, e_view_client_view_get(e_client_view_get(drag_icon_ec)));
+        e_drag_reference_point_set(e_comp_wl->drag, drag_icon_ec->x, drag_icon_ec->y);
+        e_drag_resize(e_comp_wl->drag, drag_icon_ec->w, drag_icon_ec->h);
      }
-   e_drag_start(comp_wl->drag, x, y);
+   e_drag_start(e_comp_wl->drag, x, y);
 
    desk = e_desk_current_get(e_comp_zone_find_by_ec(ec));
    ec_under_pointer = e_client_under_position_input_get(desk, x, y);
@@ -1035,17 +1020,15 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc
 }
 
 static void
-_e_comp_wl_data_device_cb_selection_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *source_resource, uint32_t serial)
+_e_comp_wl_data_device_cb_selection_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, struct wl_resource *source_resource, uint32_t serial)
 {
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
 
    DBG("Data Device Selection Set");
-   if (!comp_wl) return;
    if (!source_resource) return;
    if (!(source = wl_resource_get_user_data(source_resource))) return;
 
-   _e_comp_wl_data_device_selection_set(source, comp_wl, serial);
+   _e_comp_wl_data_device_selection_set(e_comp->wl_comp_data, source, serial);
 }
 
 static void
@@ -1066,22 +1049,17 @@ static void
 _e_comp_wl_data_device_cb_unbind(struct wl_resource *resource)
 {
    struct wl_client *wc = wl_resource_get_client(resource);
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-
-   if (!comp_wl) return;
-
-   comp_wl->selection.data_only_list =
-      eina_list_remove(comp_wl->selection.data_only_list,
+   e_comp_wl->selection.data_only_list =
+      eina_list_remove(e_comp_wl->selection.data_only_list,
                        resource);
-   eina_hash_del_by_key(comp_wl->mgr.data_resources, &wc);
+   eina_hash_del_by_key(e_comp_wl->mgr.data_resources, &wc);
 }
 
 static void
 _e_comp_wl_data_manager_cb_device_get(struct wl_client *client, struct wl_resource *manager_resource, uint32_t id, struct wl_resource *seat_resource EINA_UNUSED)
 {
    struct wl_resource *res;
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(manager_resource);
-   if (!comp_wl) return;
+
    DBG("Data Manager Device Get");
 
 
@@ -1094,8 +1072,8 @@ _e_comp_wl_data_manager_cb_device_get(struct wl_client *client, struct wl_resour
         return;
      }
 
-   eina_hash_add(comp_wl->mgr.data_resources, &client, res);
-   wl_resource_set_implementation(res, &_e_data_device_interface, comp_wl,
+   eina_hash_add(e_comp_wl->mgr.data_resources, &client, res);
+   wl_resource_set_implementation(res, &_e_data_device_interface, e_comp->wl_comp_data,
                                   _e_comp_wl_data_device_cb_unbind);
 }
 
@@ -1109,10 +1087,9 @@ static void
 _e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data EINA_UNUSED, uint32_t version EINA_UNUSED, uint32_t id)
 {
    struct wl_resource *res;
-   E_Comp_Wl_Data *comp_wl = data;
 
    /* try to create data manager resource */
-   comp_wl->mgr.resource = res = wl_resource_create(client, &wl_data_device_manager_interface, 3, id);
+   e_comp_wl->mgr.resource = res = wl_resource_create(client, &wl_data_device_manager_interface, 3, id);
    if (!res)
      {
         ERR("Could not create data device manager: %m");
@@ -1120,7 +1097,8 @@ _e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data EINA_UNUSED
         return;
      }
 
-   wl_resource_set_implementation(res, &_e_manager_interface, comp_wl, NULL);
+   wl_resource_set_implementation(res, &_e_manager_interface,
+                                  e_comp->wl_comp_data, NULL);
 }
 
 static Eina_Bool
@@ -1151,9 +1129,8 @@ _e_comp_wl_clipboard_offer_load(void *data, Ecore_Fd_Handler *handler)
         ecore_main_fd_handler_del(handler);
         if (!e_comp_wl_clipboard_source_unref(offer->source))
           {
-             E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-             if (comp_wl && comp_wl->clipboard.source == offer->source)
-               comp_wl->clipboard.source = NULL;
+             if (e_comp_wl->clipboard.source == offer->source)
+               e_comp_wl->clipboard.source = NULL;
           }
         free(offer);
      }
@@ -1181,15 +1158,14 @@ _e_comp_wl_clipboard_offer_create(E_Comp_Wl_Clipboard_Source* source, int fd)
 }
 
 static Eina_Bool
-_e_comp_wl_clipboard_source_save(void *data, Ecore_Fd_Handler *handler)
+_e_comp_wl_clipboard_source_save(void *data EINA_UNUSED, Ecore_Fd_Handler *handler)
 {
    E_Comp_Wl_Clipboard_Source *source;
    char *p;
    int len, size;
-   E_Comp_Wl_Data *comp_wl = data;
-   if (!comp_wl) return EINA_FALSE;
 
-   if (!(source = (E_Comp_Wl_Clipboard_Source*)comp_wl->clipboard.source))
+
+   if (!(source = (E_Comp_Wl_Clipboard_Source*)e_comp_wl->clipboard.source))
      return ECORE_CALLBACK_CANCEL;
 
    /* allocate contents of array */
@@ -1220,7 +1196,7 @@ _e_comp_wl_clipboard_source_save(void *data, Ecore_Fd_Handler *handler)
      {
         ERR("Could not read fd(%d): %m", source->fd[0]);
         if (!(e_comp_wl_clipboard_source_unref(source)))
-          comp_wl->clipboard.source = NULL;
+          e_comp_wl->clipboard.source = NULL;
      }
 
    return ECORE_CALLBACK_RENEW;
@@ -1259,18 +1235,15 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi
    E_Comp_Wl_Clipboard_Source *clip_source;
    int p[2];
    char *mime_type;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-
-   sel_source = (E_Comp_Wl_Data_Source*) comp_wl->selection.data_source;
-   clip_source = (E_Comp_Wl_Clipboard_Source*) comp_wl->clipboard.source;
+   sel_source = (E_Comp_Wl_Data_Source*) e_comp_wl->selection.data_source;
+   clip_source = (E_Comp_Wl_Clipboard_Source*) e_comp_wl->clipboard.source;
 
    if (!sel_source)
      {
         if (clip_source)
-          _e_comp_wl_data_device_selection_set(&clip_source->data_source,
-                                               comp_wl,
+          _e_comp_wl_data_device_selection_set(e_comp->wl_comp_data,
+                                               &clip_source->data_source,
                                                clip_source->serial);
         return;
      }
@@ -1296,10 +1269,10 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi
 
         sel_source->send(sel_source, mime_type, p[1]);
 
-        comp_wl->clipboard.source =
+        e_comp_wl->clipboard.source =
            e_comp_wl_clipboard_source_create(mime_type,
-                                             comp_wl->selection.serial, p);
-        if (!comp_wl->clipboard.source)
+                                             e_comp_wl->selection.serial, p);
+        if (!e_comp_wl->clipboard.source)
           {
              close(p[0]);
              close(p[1]);
@@ -1317,22 +1290,19 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi
 }
 
 static void
-_e_comp_wl_clipboard_create(E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_clipboard_create(void)
 {
-   comp_wl->clipboard.listener.notify = _e_comp_wl_clipboard_selection_set;
-   wl_signal_add(&comp_wl->selection.signal, &comp_wl->clipboard.listener);
+   e_comp_wl->clipboard.listener.notify = _e_comp_wl_clipboard_selection_set;
+   wl_signal_add(&e_comp_wl->selection.signal, &e_comp_wl->clipboard.listener);
 }
 
 static void
 _e_comp_wl_data_device_target_del(struct wl_listener *listener, void *data)
 {
    E_Client *ec = data;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
-   if (comp_wl->selection.target == ec)
-     comp_wl->selection.target = NULL;
+   if (e_comp_wl->selection.target == ec)
+     e_comp_wl->selection.target = NULL;
 }
 
 EINTERN void
@@ -1343,24 +1313,20 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
    int x, y;
    E_Comp_Config *comp_conf;
    E_Comp_Wl_Data_Offer *offer;
-   E_Comp_Wl_Data *comp_wl;
 
    struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
    if (!surface) return;
 
-   comp_wl = e_comp_wl_get();
-   if (!comp_wl) return;
-
    data_device_res =
        e_comp_wl_data_find_for_client(wl_resource_get_client(surface));
 
    if (!data_device_res) return;
    offer_res = e_comp_wl_data_device_send_offer(ec);
-   if (comp_wl->drag_source)
+   if (e_comp_wl->drag_source)
      {
-        E_Comp_Wl_Data_Source *drag_source = comp_wl->drag_source;
+        E_Comp_Wl_Data_Source *drag_source = e_comp_wl->drag_source;
         E_Comp_Wl_Data_Offer *new_offer;
-        E_Comp_Wl_Data_Offer *old_offer = comp_wl->drag_offer;
+        E_Comp_Wl_Data_Offer *old_offer = e_comp_wl->drag_offer;
 
         if (!offer_res) return;
 
@@ -1373,7 +1339,7 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
         drag_source->accepted = EINA_FALSE;
 
         new_offer = wl_resource_get_user_data(offer_res);
-        comp_wl->drag_offer = new_offer;
+        e_comp_wl->drag_offer = new_offer;
         if (new_offer)
           {
              _e_comp_wl_data_offer_update_action(new_offer);
@@ -1382,7 +1348,7 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
           }
      }
 
-   comp_wl->selection.target = ec;
+   e_comp_wl->selection.target = ec;
    offer = wl_resource_get_user_data(offer_res);
    offer->ec_destroy_listener.notify = _e_comp_wl_data_device_target_del;
    e_view_event_listener_add(e_view_client_view_get(e_client_view_get(ec)), E_VIEW_DESTROY, &offer->ec_destroy_listener);
@@ -1391,7 +1357,7 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
    if (e_client_transform_core_enable_get(ec))
      {
         int trans_x, trans_y;
-        e_client_transform_core_input_transform(ec, wl_fixed_to_int(comp_wl->ptr.x), wl_fixed_to_int(comp_wl->ptr.y), &trans_x, &trans_y);
+        e_client_transform_core_input_transform(ec, wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), &trans_x, &trans_y);
         x = trans_x - ec->client.x;
         y = trans_y - ec->client.y;
      }
@@ -1399,15 +1365,15 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
      {
         int ec_x, ec_y;
         e_client_geometry_get(ec, &ec_x, &ec_y, NULL, NULL);
-        x = wl_fixed_to_int(comp_wl->ptr.x) - ec_x;
-        y = wl_fixed_to_int(comp_wl->ptr.y) - ec_y;
+        x = wl_fixed_to_int(e_comp_wl->ptr.x) - ec_x;
+        y = wl_fixed_to_int(e_comp_wl->ptr.y) - ec_y;
      }
 
    comp_conf = e_comp_config_get();
    if (comp_conf && comp_conf->input_log_enable)
      ELOGF("DnD", "Data device send enter to ec(%p): %s, ptr:%d,%d", ec, ec, e_client_icccm_name_get(ec), wl_fixed_from_int(x), wl_fixed_from_int(y));
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_data_device_send_enter(data_device_res, serial, surface,
                              wl_fixed_from_int(x), wl_fixed_from_int(y), offer_res);
 }
@@ -1417,12 +1383,9 @@ e_comp_wl_data_device_send_leave(E_Client *ec)
 {
    E_Comp_Config *comp_conf;
    struct wl_resource *res;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
-   if (comp_wl->selection.target == ec)
-     comp_wl->selection.target = NULL;
+   if (e_comp_wl->selection.target == ec)
+     e_comp_wl->selection.target = NULL;
    struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
    if (!surface) return;
 
@@ -1472,18 +1435,14 @@ e_comp_wl_data_device_send_offer(E_Client *ec)
 {
    struct wl_resource *data_device_res, *offer_res = NULL;
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl;
 
    struct wl_resource *surface = e_comp_wl_client_surface_get(ec);
    if (!surface) return NULL;
 
-   comp_wl = e_comp_wl_get();
-   if (!comp_wl) return NULL;
-
    data_device_res =
       e_comp_wl_data_find_for_client(wl_resource_get_client(surface));
    if (!data_device_res) return NULL;
-   source = comp_wl->drag_source;
+   source = e_comp_wl->drag_source;
    if (source)
      offer_res = _e_comp_wl_data_device_data_offer_create(source, data_device_res);
    return offer_res;
@@ -1494,13 +1453,6 @@ e_comp_wl_data_device_keyboard_focus_set(void)
 {
    struct wl_resource *data_device_res, *offer_res = NULL, *focus;
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get()))
-     {
-        ERR("E_Comp_Wl_Data is not initailized");
-        return;
-     }
 
    if (!e_comp_input_key->kbd.enabled)
      {
@@ -1513,15 +1465,15 @@ e_comp_wl_data_device_keyboard_focus_set(void)
         ERR("No focused resource");
         return;
      }
-   source = (E_Comp_Wl_Data_Source*)comp_wl->selection.data_source;
+   source = (E_Comp_Wl_Data_Source*)e_comp_wl->selection.data_source;
 
    data_device_res =
       e_comp_wl_data_find_for_client(wl_resource_get_client(focus));
    if (!data_device_res) return;
 
    /* to remove from data_only_list if it is on the list */
-   comp_wl->selection.data_only_list =
-      eina_list_remove(comp_wl->selection.data_only_list,
+   e_comp_wl->selection.data_only_list =
+      eina_list_remove(e_comp_wl->selection.data_only_list,
                        data_device_res);
 
    if (source && !source->is_manual)
@@ -1535,24 +1487,21 @@ e_comp_wl_data_device_keyboard_focus_set(void)
 EINTERN Eina_Bool
 e_comp_wl_data_manager_init(void)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
    /* try to create global data manager */
-   comp_wl->mgr.global =
-       wl_global_create(comp_wl->wl.disp, &wl_data_device_manager_interface, 3,
-                        comp_wl, _e_comp_wl_data_cb_bind_manager);
-   if (!comp_wl->mgr.global)
+   e_comp_wl->mgr.global =
+       wl_global_create(e_comp_wl->wl.disp, &wl_data_device_manager_interface, 3,
+                        e_comp->wl_comp_data, _e_comp_wl_data_cb_bind_manager);
+   if (!e_comp_wl->mgr.global)
      {
         ERR("Could not create global for data device manager: %m");
         return EINA_FALSE;
      }
 
-   wl_signal_init(&comp_wl->selection.signal);
+   wl_signal_init(&e_comp_wl->selection.signal);
 
    /* create clipboard */
-   _e_comp_wl_clipboard_create(comp_wl);
-   comp_wl->mgr.data_resources = eina_hash_pointer_new(NULL);
+   _e_comp_wl_clipboard_create();
+   e_comp_wl->mgr.data_resources = eina_hash_pointer_new(NULL);
 
    return EINA_TRUE;
 }
@@ -1560,24 +1509,17 @@ e_comp_wl_data_manager_init(void)
 EINTERN void
 e_comp_wl_data_manager_shutdown(void)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
    /* destroy the global manager resource */
-   /* if (comp_wl->mgr.global) wl_global_destroy(comp_wl->mgr.global); */
+   /* if (e_comp_wl->mgr.global) wl_global_destroy(e_comp_wl->mgr.global); */
 
-   wl_list_remove(&comp_wl->clipboard.listener.link);
-   E_FREE_FUNC(comp_wl->mgr.data_resources, eina_hash_free);
+   wl_list_remove(&e_comp_wl->clipboard.listener.link);
+   E_FREE_FUNC(e_comp_wl->mgr.data_resources, eina_hash_free);
 }
 
 EINTERN struct wl_resource *
 e_comp_wl_data_find_for_client(struct wl_client *client)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return NULL;
-
-   return eina_hash_find(comp_wl->mgr.data_resources, &client);
+   return eina_hash_find(e_comp_wl->mgr.data_resources, &client);
 }
 
 EINTERN E_Comp_Wl_Data_Source *
@@ -1654,7 +1596,7 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int *f
         source->fd_handler =
            ecore_main_fd_handler_add(fd[0], ECORE_FD_READ,
                                      _e_comp_wl_clipboard_source_save,
-                                     e_comp_wl_get(), NULL, NULL);
+                                     e_comp->wl_comp_data, NULL, NULL);
         if (!source->fd_handler)
           {
              E_FREE(source);
@@ -1709,20 +1651,18 @@ e_comp_wl_data_device_only_set(struct wl_resource *data_device_res, Eina_Bool se
 {
    struct wl_resource *offer_res = NULL, *focus;
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl;
 
    EINA_SAFETY_ON_NULL_RETURN(data_device_res);
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    if (set)
      {
-        if (eina_list_data_find(comp_wl->selection.data_only_list, data_device_res))
+        if (eina_list_data_find(e_comp_wl->selection.data_only_list, data_device_res))
           return;
 
-        comp_wl->selection.data_only_list =
-           eina_list_append(comp_wl->selection.data_only_list, data_device_res);
+        e_comp_wl->selection.data_only_list =
+           eina_list_append(e_comp_wl->selection.data_only_list, data_device_res);
 
-        source = (E_Comp_Wl_Data_Source *)comp_wl->selection.data_source;
+        source = (E_Comp_Wl_Data_Source *)e_comp_wl->selection.data_source;
         if (source && !source->is_manual)
           {
              offer_res =
@@ -1732,8 +1672,8 @@ e_comp_wl_data_device_only_set(struct wl_resource *data_device_res, Eina_Bool se
      }
    else
      {
-        comp_wl->selection.data_only_list =
-           eina_list_remove(comp_wl->selection.data_only_list, data_device_res);
+        e_comp_wl->selection.data_only_list =
+           eina_list_remove(e_comp_wl->selection.data_only_list, data_device_res);
 
         focus = e_comp_input_key->kbd.focus;
         if ((!focus) ||
@@ -1749,14 +1689,11 @@ _e_comp_wl_data_device_destroy_manual_source(struct wl_listener *listener EINA_U
 {
   struct wl_resource *data_device_res = NULL;
   struct wl_client *cbhm_client = NULL;
-  E_Comp_Wl_Data *comp_wl;
-
-  if (!(comp_wl = e_comp_wl_get())) return;
 
-  comp_wl->selection.data_source = NULL;
+  e_comp_wl->selection.data_source = NULL;
 
-  if (comp_wl->selection.cbhm)
-     cbhm_client =  wl_resource_get_client(comp_wl->selection.cbhm);
+  if (e_comp_wl->selection.cbhm)
+     cbhm_client =  wl_resource_get_client(e_comp_wl->selection.cbhm);
 
    if (cbhm_client)
      {
@@ -1847,27 +1784,24 @@ _e_comp_wl_data_device_manual_selection_set(E_Comp_Wl_Data_Source *source, uint3
    E_Comp_Wl_Data_Source *sel_source;
    struct wl_resource *offer_res, *data_device_res;
    struct wl_client *cbhm_client = NULL;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
+   sel_source = (E_Comp_Wl_Data_Source*)e_comp_wl->selection.data_source;
 
-   sel_source = (E_Comp_Wl_Data_Source*)comp_wl->selection.data_source;
-
-   if (comp_wl->selection.cbhm)
-     cbhm_client = wl_resource_get_client(comp_wl->selection.cbhm);
+   if (e_comp_wl->selection.cbhm)
+     cbhm_client = wl_resource_get_client(e_comp_wl->selection.cbhm);
 
    if (sel_source)
      {
-        if (!comp_wl->clipboard.xwl_owner)
-          wl_list_remove(&comp_wl->selection.data_source_listener.link);
+        if (!e_comp_wl->clipboard.xwl_owner)
+          wl_list_remove(&e_comp_wl->selection.data_source_listener.link);
         if (sel_source->cancelled)
           sel_source->cancelled(sel_source);
-        comp_wl->selection.data_source = NULL;
+        e_comp_wl->selection.data_source = NULL;
      }
 
-   comp_wl->selection.data_source = sel_source = source;
-   comp_wl->clipboard.xwl_owner = NULL;
-   comp_wl->selection.serial = serial;
+   e_comp_wl->selection.data_source = sel_source = source;
+   e_comp_wl->clipboard.xwl_owner = NULL;
+   e_comp_wl->selection.serial = serial;
 
    if (cbhm_client)
      {
@@ -1883,14 +1817,14 @@ _e_comp_wl_data_device_manual_selection_set(E_Comp_Wl_Data_Source *source, uint3
      }
 
    //do not notify to internal clipboard
-   //wl_signal_emit(&comp_wl->selection.signal, comp_wl);
+   //wl_signal_emit(&e_comp_wl->selection.signal, e_comp->wl_comp_data);
 
    if (source)
      {
-        comp_wl->selection.data_source_listener.notify =
+        e_comp_wl->selection.data_source_listener.notify =
            _e_comp_wl_data_device_destroy_manual_source;
         wl_signal_add(&source->destroy_signal,
-                      &comp_wl->selection.data_source_listener);
+                      &e_comp_wl->selection.data_source_listener);
      }
 }
 
@@ -1898,12 +1832,10 @@ EINTERN Eina_Bool
 e_comp_wl_data_device_manual_selection_set(void *data, size_t size, Eina_List *mime_list)
 {
    E_Comp_Wl_Manual_Data_Source *man_source;
-   E_Comp_Wl_Data *comp_wl;
    Eina_List *l;
    const char *t;
 
    if ((size <= 0) || (!data) || (!mime_list)) return EINA_FALSE;
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
 
    man_source = E_NEW(E_Comp_Wl_Manual_Data_Source, 1);
    if (!man_source) return EINA_FALSE;
@@ -1917,7 +1849,7 @@ e_comp_wl_data_device_manual_selection_set(void *data, size_t size, Eina_List *m
    wl_array_init(&man_source->contents);
    wl_signal_init(&man_source->data_source.destroy_signal);
 
-   man_source->serial = comp_wl->selection.serial;
+   man_source->serial = e_comp_wl->selection.serial;
 
    if (!man_source->data_source.mime_types)
      man_source->data_source.mime_types = eina_array_new(64);
@@ -1945,19 +1877,13 @@ e_comp_wl_data_device_manual_selection_set(void *data, size_t size, Eina_List *m
 EINTERN void
 e_comp_wl_data_current_device_id_set(int id)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (comp_wl)
-     comp_wl->drag_device_id = id;
+   e_comp_wl->drag_device_id = id;
 }
 
 EINTERN int
 e_comp_wl_data_current_device_id_get(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (comp_wl)
-     return comp_wl->drag_device_id;
-
-   return -1; // Invalid drag_device_id
+   return e_comp_wl->drag_device_id;
 }
 
 EINTERN void
@@ -1982,15 +1908,15 @@ e_comp_wl_data_offer_mimetype_action_accept(E_Comp_Wl_Data_Offer *offer)
 }
 
 static Eina_Bool
-_e_comp_wl_data_secondary_list_check(E_Client *ec, E_Comp_Wl_Data *comp_wl)
+_e_comp_wl_data_secondary_list_check(E_Client *ec)
 {
    E_Client *tmp;
    Eina_List *l;
 
-   if (comp_wl->selection.secondary_list == NULL)
+   if (e_comp_wl->selection.secondary_list == NULL)
      return EINA_FALSE;
 
-   EINA_LIST_FOREACH(comp_wl->selection.secondary_list, l, tmp)
+   EINA_LIST_FOREACH(e_comp_wl->selection.secondary_list, l, tmp)
      {
         if (tmp == ec)
           return EINA_TRUE;
@@ -2002,34 +1928,32 @@ _e_comp_wl_data_secondary_list_check(E_Client *ec, E_Comp_Wl_Data *comp_wl)
 EINTERN void
 e_comp_wl_data_secondary_add(E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
    EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (_e_comp_wl_data_secondary_list_check(ec, comp_wl) == EINA_TRUE) return;
+   if (_e_comp_wl_data_secondary_list_check(ec) == EINA_TRUE)
+     return;
 
-   comp_wl->selection.secondary_list = eina_list_append(comp_wl->selection.secondary_list, ec);
+   e_comp_wl->selection.secondary_list = eina_list_append(e_comp_wl->selection.secondary_list, ec);
    DBG("add secondary %s(%p). listcount(%d)",
-       e_client_util_name_get(ec), ec, eina_list_count(comp_wl->selection.secondary_list));
+       e_client_util_name_get(ec), ec, eina_list_count(e_comp_wl->selection.secondary_list));
 }
 
 EINTERN void
 e_comp_wl_data_secondary_remove(E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
-
    EINA_SAFETY_ON_NULL_RETURN(ec);
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (_e_comp_wl_data_secondary_list_check(ec, comp_wl) == EINA_FALSE) return;
 
-   comp_wl->selection.secondary_list = eina_list_remove(comp_wl->selection.secondary_list, ec);
+   if (_e_comp_wl_data_secondary_list_check(ec) == EINA_FALSE)
+     return;
+
+   e_comp_wl->selection.secondary_list = eina_list_remove(e_comp_wl->selection.secondary_list, ec);
    DBG("remove secondary %s(%p). listcount(%d)",
-       e_client_util_name_get(ec), ec, eina_list_count(comp_wl->selection.secondary_list));
+       e_client_util_name_get(ec), ec, eina_list_count(e_comp_wl->selection.secondary_list));
 
-   if (eina_list_count(comp_wl->selection.secondary_list) == 0)
+   if (eina_list_count(e_comp_wl->selection.secondary_list) == 0)
      {
-        eina_list_free(comp_wl->selection.secondary_list);
-        comp_wl->selection.secondary_list = NULL;
-        comp_wl->selection.secondary_sent = NULL;
+        eina_list_free(e_comp_wl->selection.secondary_list);
+        e_comp_wl->selection.secondary_list = NULL;
+        e_comp_wl->selection.secondary_sent = NULL;
      }
 }
index 43adf2079ab15b87622decab906f24183e949f01..a25793a887591a5bb629ab636c4ad872cdb2c8f2 100644 (file)
@@ -81,20 +81,20 @@ _e_comp_wl_input_is_position_inside_constraint_region(E_Comp_Wl_Pointer_Constrai
                                                       wl_fixed_t fy);
 
 static void
-_e_comp_wl_input_update_seat_caps(E_Comp_Wl_Data *comp_wl, struct wl_client *wc)
+_e_comp_wl_input_update_seat_caps(struct wl_client *wc)
 {
    Eina_List *l;
    struct wl_resource *res;
    enum wl_seat_capability caps = 0;
 
-   if (comp_wl->ptr.enabled)
+   if (e_comp_wl->ptr.enabled)
      caps |= WL_SEAT_CAPABILITY_POINTER;
    if (e_comp_input_key->kbd.enabled)
      caps |= WL_SEAT_CAPABILITY_KEYBOARD;
-   if (comp_wl->touch.enabled)
+   if (e_comp_wl->touch.enabled)
      caps |= WL_SEAT_CAPABILITY_TOUCH;
 
-   EINA_LIST_FOREACH(comp_wl->seat.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, res)
      {
         /* if a wc is null, send seat capability to all wl_seat resources */
         if (wc && (wl_resource_get_client(res) != wc)) continue;
@@ -108,24 +108,22 @@ _e_comp_wl_input_pointer_map(struct wl_resource *resource)
    E_Client *ec;
    E_Pointer *ptr;
    struct wl_client *wc;
-   E_Comp_Wl_Data *comp_wl;
 
    if (!(ec = e_client_from_surface_resource(resource))) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    //if cursor ec have external content
    e_comp_object_content_unset(ec->frame);
 
-   if (!comp_wl->ptr.ec || !comp_wl->ptr.ec->comp_data) return;
-   struct wl_resource *surface = e_comp_wl_client_surface_get(comp_wl->ptr.ec);
+   if (!e_comp_wl->ptr.ec || !e_comp_wl->ptr.ec->comp_data) return;
+   struct wl_resource *surface = e_comp_wl_client_surface_get(e_comp_wl->ptr.ec);
    if (!surface) return;
 
    wc = wl_resource_get_client(resource);
    if (wc != wl_resource_get_client(surface)) return;
-   if (!comp_wl->ptr.ec->pointer_enter_sent) return;
+   if (!e_comp_wl->ptr.ec->pointer_enter_sent) return;
 
-   if ((ptr = e_comp_pointer_get()))
+   if ((ptr = e_comp->pointer))
      e_pointer_view_set(ptr, e_client_view_get(ec), ptr->hot.x, ptr->hot.y);
 }
 
@@ -160,12 +158,11 @@ _e_comp_wl_input_thread_cursor_set(void *data)
 }
 
 static void
-_e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resource *resource, uint32_t serial EINA_UNUSED, struct wl_resource *surface_resource, int32_t x, int32_t y)
+_e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *surface_resource, int32_t x, int32_t y)
 {
    E_Client *ec;
    Eina_Bool got_mouse = EINA_FALSE;
    struct wl_resource *surface;
-   E_Pointer *comp_pointer;
 
    E_Input_Thread_Request_EClient_Data ec_data;
    memset(&ec_data, 0, sizeof(E_Input_Thread_Request_EClient_Data));
@@ -190,14 +187,13 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
      }
    if (!surface_resource || e_policy_client_is_waydroid(ec))
      {
-        E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-        if (e_policy_client_is_waydroid(ec) && comp_wl && comp_wl->drag)
+        if (e_policy_client_is_waydroid(ec) && e_comp_wl->drag)
           {
              ELOGF("COMP", "Cursor Set ignored. dragging on Waydroid", ec);
              return;
           }
 
-        e_pointer_view_set(e_comp_pointer_get(), NULL, x, y);
+        e_pointer_view_set(e_comp->pointer, NULL, x, y);
         ec->has_cursor_unset = EINA_TRUE;
         ELOGF("COMP", "Cursor Set. has_cursor_unset:TRUE", ec);
         return;
@@ -254,12 +250,12 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
 #if 0
    /* ignore cursor changes during resize/move I guess */
    if (e_client_action_get()) return;
-   e_pointer_view_set(e_comp_pointer_get(), e_client_view_get(ec), x, y);
+   e_pointer_view_set(e_comp->pointer, e_client_view_get(ec), x, y);
 #endif
-   if ((comp_pointer = e_comp_pointer_get()) != NULL)
+   if (e_comp->pointer)
      {
-        comp_pointer->hot.x = x;
-        comp_pointer->hot.y = y;
+        e_comp->pointer->hot.x = x;
+        e_comp->pointer->hot.y = y;
         if (e_config->show_cursor)
           ec->visible = EINA_TRUE;
      }
@@ -284,13 +280,10 @@ static const struct wl_touch_interface _e_touch_interface =
 static void
 _e_comp_wl_input_cb_pointer_unbind(struct wl_resource *resource)
 {
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-   if (!comp_wl) return;
+   e_comp_wl->ptr.resources =
+     eina_list_remove(e_comp_wl->ptr.resources, resource);
 
-   comp_wl->ptr.resources =
-     eina_list_remove(comp_wl->ptr.resources, resource);
-
-   wl_signal_emit(&comp_wl->ptr_constraints.pointer_destroy_signal, resource);
+   wl_signal_emit(&e_comp_wl->ptr_constraints.pointer_destroy_signal, resource);
 }
 
 static void
@@ -299,9 +292,6 @@ _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *re
    struct wl_resource *res;
    struct wl_client *ptr_client = NULL;
    E_Comp_Wl_Client_Data *cdata = NULL;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    /* try to create pointer resource */
    res = wl_resource_create(client, &wl_pointer_interface,
@@ -309,20 +299,20 @@ _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *re
    if (!res)
      {
         ERR("Could not create pointer on seat %s: %m",
-            comp_wl->seat.name);
+            e_comp_wl->seat.name);
         wl_client_post_no_memory(client);
         return;
      }
 
-   comp_wl->ptr.resources =
-     eina_list_append(comp_wl->ptr.resources, res);
+   e_comp_wl->ptr.resources =
+     eina_list_append(e_comp_wl->ptr.resources, res);
    wl_resource_set_implementation(res, &_e_pointer_interface,
-                                  comp_wl,
+                                  e_comp->wl_comp_data,
                                  _e_comp_wl_input_cb_pointer_unbind);
 
-   if ((comp_wl->ptr.num_devices == 1) && comp_wl->ptr.ec && !comp_wl->ptr.ec->pointer_enter_sent && !e_config->use_cursor_timer)
+   if ((e_comp_wl->ptr.num_devices == 1) && e_comp_wl->ptr.ec && !e_comp_wl->ptr.ec->pointer_enter_sent && !e_config->use_cursor_timer)
      {
-        cdata = (E_Comp_Wl_Client_Data*)comp_wl->ptr.ec->comp_data;
+        cdata = (E_Comp_Wl_Client_Data*)e_comp_wl->ptr.ec->comp_data;
         if (cdata && cdata->wl_surface)
           ptr_client = wl_resource_get_client(cdata->wl_surface);
 
@@ -332,7 +322,7 @@ _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *re
              Eina_List *list, *l;
              const char *name, *desc;
 
-             list = (Eina_List *)evas_device_list(evas_object_evas_get(comp_wl->ptr.ec->frame), NULL);
+             list = (Eina_List *)evas_device_list(evas_object_evas_get(e_comp_wl->ptr.ec->frame), NULL);
              EINA_LIST_FOREACH(list, l, dev)
                {
                   name = evas_device_name_get(dev);
@@ -348,7 +338,7 @@ _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *re
                     }
                }
              if (last_ptr)
-               e_comp_wl_mouse_in_renew(comp_wl->ptr.ec, 0, wl_fixed_to_int(comp_wl->ptr.x), wl_fixed_to_int(comp_wl->ptr.y), NULL, NULL, NULL, ecore_time_get(), EVAS_EVENT_FLAG_NONE, last_ptr, NULL);
+               e_comp_wl_mouse_in_renew(e_comp_wl->ptr.ec, 0, wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), NULL, NULL, NULL, ecore_time_get(), EVAS_EVENT_FLAG_NONE, last_ptr, NULL);
           }
      }
 }
@@ -380,7 +370,7 @@ _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource)
    _e_comp_wl_input_thread_cb_keyboard_unbind(&resource);
 }
 
-EINTERN void
+void
 e_comp_wl_input_keyboard_enter_send(struct wl_resource *surface)
 {
    struct wl_resource *res;
@@ -388,14 +378,15 @@ e_comp_wl_input_keyboard_enter_send(struct wl_resource *surface)
    uint32_t serial;
    xkb_mod_mask_t mod_depressed, mod_latched, mod_locked;
    xkb_layout_index_t mod_group;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!e_comp_input_key->kbd.focused) return;
+   if (!e_comp_input_key->kbd.focused)
+     {
+        return;
+     }
 
    e_comp_wl_input_keyboard_modifiers_serialize();
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    mod_depressed = atomic_load(&e_comp_input_key->kbd.mod_depressed);
    mod_latched = atomic_load(&e_comp_input_key->kbd.mod_latched);
@@ -457,9 +448,6 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
 {
    struct wl_resource *res;
    E_Input_Thread_Request_Keyboard_Get_Data keyboard_get_data;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return;
 
    /* try to create keyboard resource */
    res = wl_resource_create(client, &wl_keyboard_interface,
@@ -467,13 +455,13 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
    if (!res)
      {
         ERR("Could not create keyboard on seat %s: %m",
-            comp_wl->seat.name);
+            e_comp_wl->seat.name);
         wl_client_post_no_memory(client);
         return;
      }
 
    wl_resource_set_implementation(res, &_e_keyboard_interface,
-                                  comp_wl,
+                                  e_comp->wl_comp_data,
                                   _e_comp_wl_input_cb_keyboard_unbind);
 
    /* send current keymap */
@@ -492,19 +480,14 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
 static void
 _e_comp_wl_input_cb_touch_unbind(struct wl_resource *resource)
 {
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-   if (comp_wl)
-     comp_wl->touch.resources =
-       eina_list_remove(comp_wl->touch.resources, resource);
+   e_comp_wl->touch.resources =
+     eina_list_remove(e_comp_wl->touch.resources, resource);
 }
 
 static void
 _e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id EINA_UNUSED)
 {
     struct wl_resource *res;
-    E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-    if (!comp_wl) return;
 
     /* try to create pointer resource */
     res = wl_resource_create(client, &wl_touch_interface,
@@ -512,15 +495,15 @@ _e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_re
     if (!res)
       {
          ERR("Could not create touch on seat %s: %m",
-             comp_wl->seat.name);
+             e_comp_wl->seat.name);
          wl_client_post_no_memory(client);
          return;
       }
 
-    comp_wl->touch.resources =
-     eina_list_append(comp_wl->touch.resources, res);
+    e_comp_wl->touch.resources =
+     eina_list_append(e_comp_wl->touch.resources, res);
     wl_resource_set_implementation(res, &_e_touch_interface,
-                                   comp_wl,
+                                   e_comp->wl_comp_data,
                                   _e_comp_wl_input_cb_touch_unbind);
 }
 
@@ -535,25 +518,21 @@ static void
 _e_comp_wl_input_cb_unbind_seat(struct wl_resource *resource)
 {
    E_Comp_Wl_Seat *seat = wl_resource_get_user_data(resource);
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return;
 
    INF("Unbind seat: %u (client: %p)", wl_resource_get_id(resource), wl_resource_get_client(resource));
 
-   comp_wl->seat.resources =
-     eina_list_remove(comp_wl->seat.resources, resource);
+   e_comp_wl->seat.resources =
+     eina_list_remove(e_comp_wl->seat.resources, resource);
    E_FREE(seat);
 }
 
 static void
-_e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
+_e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data EINA_UNUSED, uint32_t version, uint32_t id)
 {
    struct wl_resource *res;
    Eina_List *l;
    struct wl_resource *tmp_res;
    E_Comp_Wl_Seat *seat;
-   E_Comp_Wl_Data *comp_wl = data;
 
    seat = E_NEW(E_Comp_Wl_Seat, 1);
    if (!seat)
@@ -564,7 +543,7 @@ _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data, uint32_t ver
      }
    seat->is_first_resource = 1;
 
-   EINA_LIST_FOREACH(comp_wl->seat.resources, l, tmp_res)
+   EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, tmp_res)
      {
         if (wl_resource_get_client(tmp_res) != client) continue;
         DBG("wl_seat (res: %d) is already bound to client (%p)",
@@ -583,17 +562,17 @@ _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data, uint32_t ver
    INF("Bind seat: %u (client: %p)", wl_resource_get_id(res), client);
 
    /* store version of seat interface for reuse in updating capabilities */
-   comp_wl->seat.version = version;
-   comp_wl->seat.resources =
-     eina_list_append(comp_wl->seat.resources, res);
+   e_comp_wl->seat.version = version;
+   e_comp_wl->seat.resources =
+     eina_list_append(e_comp_wl->seat.resources, res);
 
    wl_resource_set_implementation(res, &_e_seat_interface,
                                   seat,
                                   _e_comp_wl_input_cb_unbind_seat);
 
-   _e_comp_wl_input_update_seat_caps(comp_wl, client);
-   if (comp_wl->seat.version >= WL_SEAT_NAME_SINCE_VERSION)
-     wl_seat_send_name(res, comp_wl->seat.name);
+   _e_comp_wl_input_update_seat_caps(client);
+   if (e_comp_wl->seat.version >= WL_SEAT_NAME_SINCE_VERSION)
+     wl_seat_send_name(res, e_comp_wl->seat.name);
 }
 
 static void
@@ -617,10 +596,8 @@ _e_comp_wl_input_cb_relative_pointer_manager_destroy(struct wl_client *client,
 static void
 _e_comp_wl_input_cb_unbind_relative_pointer(struct wl_resource *resource)
 {
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-   if (comp_wl)
-     comp_wl->relative_ptr.resources =
-       eina_list_remove(comp_wl->relative_ptr.resources, resource);
+   e_comp_wl->relative_ptr.resources =
+     eina_list_remove(e_comp_wl->relative_ptr.resources, resource);
 }
 
 static void
@@ -630,9 +607,6 @@ _e_comp_wl_input_cb_relative_pointer_manager_get_relative_pointer(struct wl_clie
                                                               struct wl_resource *pointer_resource)
 {
    struct wl_resource *res = NULL;
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-
-   if (!comp_wl) return;
 
    res = wl_resource_create(client, &zwp_relative_pointer_v1_interface, 1, id);
 
@@ -643,14 +617,14 @@ _e_comp_wl_input_cb_relative_pointer_manager_get_relative_pointer(struct wl_clie
         return;
      }
 
-   comp_wl->relative_ptr.resources =
-     eina_list_append(comp_wl->relative_ptr.resources, res);
+   e_comp_wl->relative_ptr.resources =
+     eina_list_append(e_comp_wl->relative_ptr.resources, res);
 
    /* FIXME: must consider destroying relative pointer together
              when the wl_pointer is destroyed */
    (void) pointer_resource;
    wl_resource_set_implementation(res, &_e_relative_pointer_interface,
-                                  comp_wl, _e_comp_wl_input_cb_unbind_relative_pointer);
+                                  NULL, _e_comp_wl_input_cb_unbind_relative_pointer);
 }
 
 static const struct zwp_relative_pointer_manager_v1_interface _e_relative_pointer_manager_interface = {
@@ -661,20 +635,18 @@ static const struct zwp_relative_pointer_manager_v1_interface _e_relative_pointe
 static void
 _e_comp_wl_input_cb_unbind_relative_pointer_manager(struct wl_resource *resource)
 {
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-   if (comp_wl)
-     comp_wl->relative_ptr.manager_resources =
-       eina_list_remove(comp_wl->relative_ptr.manager_resources, resource);
+   e_comp_wl->relative_ptr.manager_resources =
+     eina_list_remove(e_comp_wl->relative_ptr.manager_resources, resource);
 }
 
 static void
 _e_comp_wl_input_cb_bind_relative_pointer_manager(struct wl_client *client,
-                                                  void *data,
+                                                  void *data EINA_UNUSED,
                                                   uint32_t version,
                                                   uint32_t id)
 {
    struct wl_resource *resource = NULL;
-   E_Comp_Wl_Data *comp_wl = data;
+
    resource = wl_resource_create(client, &zwp_relative_pointer_manager_v1_interface, 1, id);
 
    if (!resource)
@@ -684,10 +656,10 @@ _e_comp_wl_input_cb_bind_relative_pointer_manager(struct wl_client *client,
         return;
      }
 
-   comp_wl->relative_ptr.manager_resources =
-     eina_list_append(comp_wl->relative_ptr.manager_resources, resource);
+   e_comp_wl->relative_ptr.manager_resources =
+     eina_list_append(e_comp_wl->relative_ptr.manager_resources, resource);
    wl_resource_set_implementation(resource, &_e_relative_pointer_manager_interface,
-                                  comp_wl, _e_comp_wl_input_cb_unbind_relative_pointer_manager);
+                                  NULL, _e_comp_wl_input_cb_unbind_relative_pointer_manager);
 }
 
 void
@@ -723,15 +695,11 @@ _e_comp_wl_input_pointer_constraint_notify_deactivated(E_Comp_Wl_Pointer_Constra
 static void
 _e_comp_wl_input_pointer_constraint_deactivate(E_Comp_Wl_Pointer_Constraint *constraint)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return;
-
    constraint->active = EINA_FALSE;
-   comp_wl->ptr_constraints.activated = EINA_FALSE;
-   comp_wl->ptr_constraints.ec = NULL;
-   comp_wl->relative_ptr.activated = EINA_FALSE;
-   comp_wl->relative_ptr.ec = NULL;
+   e_comp_wl->ptr_constraints.activated = EINA_FALSE;
+   e_comp_wl->ptr_constraints.ec = NULL;
+   e_comp_wl->relative_ptr.activated = EINA_FALSE;
+   e_comp_wl->relative_ptr.ec = NULL;
    e_input_relative_motion_handler_set(NULL);
    _e_comp_wl_input_pointer_constraint_notify_deactivated(constraint);
    wl_list_remove(&constraint->surface_unmap_listener.link);
@@ -805,7 +773,7 @@ _e_comp_wl_input_pointer_constraint_notify_activated(E_Comp_Wl_Pointer_Constrain
 }
 
 static void
-_e_comp_wl_input_pointer_constraint_enable(E_Comp_Wl_Data *comp_wl, E_Comp_Wl_Pointer_Constraint *constraint)
+_e_comp_wl_input_pointer_constraint_enable(E_Comp_Wl_Pointer_Constraint *constraint)
 {
    if (constraint->active)
      {
@@ -815,26 +783,24 @@ _e_comp_wl_input_pointer_constraint_enable(E_Comp_Wl_Data *comp_wl, E_Comp_Wl_Po
 
    constraint->active = EINA_TRUE;
    E_Client *ec = constraint->ec;
-   comp_wl->ptr_constraints.activated = EINA_TRUE;
-   comp_wl->ptr_constraints.ec = ec;
-   comp_wl->relative_ptr.activated = EINA_TRUE;
-   comp_wl->relative_ptr.ec = ec;
+   e_comp_wl->ptr_constraints.activated = EINA_TRUE;
+   e_comp_wl->ptr_constraints.ec = ec;
+   e_comp_wl->relative_ptr.activated = EINA_TRUE;
+   e_comp_wl->relative_ptr.ec = ec;
    _e_comp_wl_input_pointer_constraint_notify_activated(constraint);
-   wl_signal_add(&comp_wl->ptr_constraints.surface_unmap_signal,
+   wl_signal_add(&e_comp_wl->ptr_constraints.surface_unmap_signal,
                  &constraint->surface_unmap_listener);
    if (!e_input_relative_motion_handler_set(_e_comp_wl_input_relative_motion_handler))
      ERR("ERROR! Could not set relative motion handler !");
 
-   E_FREE_FUNC(comp_wl->ptr.hide_tmr, ecore_timer_del);
+   E_FREE_FUNC(e_comp_wl->ptr.hide_tmr, ecore_timer_del);
 }
 
 static void
 _e_comp_wl_input_pointer_constraints_check_enable(E_Comp_Wl_Pointer_Constraint *constraint)
 {
    int px, py, cx, cy;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   if (!comp_wl) return;
    if (!constraint || !constraint->ec)
      {
         ERR("Invalid constraint or ec of it.");
@@ -842,8 +808,8 @@ _e_comp_wl_input_pointer_constraints_check_enable(E_Comp_Wl_Pointer_Constraint *
      }
 
    E_Client *ec = constraint->ec;
-   px = wl_fixed_to_int(comp_wl->ptr.x);
-   py = wl_fixed_to_int(comp_wl->ptr.y);
+   px = wl_fixed_to_int(e_comp_wl->ptr.x);
+   py = wl_fixed_to_int(e_comp_wl->ptr.y);
 
    if (e_client_transform_core_enable_get(ec))
      {
@@ -857,7 +823,7 @@ _e_comp_wl_input_pointer_constraints_check_enable(E_Comp_Wl_Pointer_Constraint *
    cy = py - ec->client.y;
    INF("Constraint check. ptr(%d, %d) cx/cy(%d, %d) ec(%p)", px, py, cx, cy, ec);
 
-   if ((!comp_wl->ptr.ec) || (comp_wl->ptr.ec != ec)
+   if ((!e_comp_wl->ptr.ec) || (e_comp_wl->ptr.ec != ec)
         || (!ec->pointer_enter_sent))
      return;
 
@@ -866,7 +832,7 @@ _e_comp_wl_input_pointer_constraints_check_enable(E_Comp_Wl_Pointer_Constraint *
                                                               cy))
      return;
 
-   _e_comp_wl_input_pointer_constraint_enable(comp_wl, constraint);
+   _e_comp_wl_input_pointer_constraint_enable(constraint);
 }
 
 static void
@@ -1025,9 +991,6 @@ _e_comp_wl_input_pointer_constraint_create(E_Client *ec,
                                            E_Comp_Wl_Pointer_Constraint_Type type)
 {
    E_Comp_Wl_Pointer_Constraint *constraint;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return NULL;
 
    constraint = E_NEW(E_Comp_Wl_Pointer_Constraint, 1);
 
@@ -1089,13 +1052,13 @@ _e_comp_wl_input_pointer_constraint_create(E_Client *ec,
    constraint->surface_mouseout_listener.notify =
      _e_comp_wl_input_cb_pointer_constraints_surface_mouseout;
 
-   wl_signal_add(&comp_wl->ptr_constraints.pointer_destroy_signal,
+   wl_signal_add(&e_comp_wl->ptr_constraints.pointer_destroy_signal,
                  &constraint->pointer_destroy_listener);
-   wl_signal_add(&comp_wl->ptr_constraints.surface_commit_signal,
+   wl_signal_add(&e_comp_wl->ptr_constraints.surface_commit_signal,
                  &constraint->surface_commit_listener);
-   wl_signal_add(&comp_wl->ptr_constraints.surface_mousein_signal,
+   wl_signal_add(&e_comp_wl->ptr_constraints.surface_mousein_signal,
                  &constraint->surface_mousein_listener);
-   wl_signal_add(&comp_wl->ptr_constraints.surface_mouseout_signal,
+   wl_signal_add(&e_comp_wl->ptr_constraints.surface_mouseout_signal,
                  &constraint->surface_mouseout_listener);
    wl_list_init(&constraint->surface_unmap_listener.link);
 
@@ -1299,17 +1262,14 @@ static const struct zwp_pointer_constraints_v1_interface _e_pointer_constraints_
 static void
 _e_comp_wl_input_cb_unbind_pointer_constraints(struct wl_resource *resource)
 {
-   E_Comp_Wl_Data *comp_wl = wl_resource_get_user_data(resource);
-   if (comp_wl)
-     comp_wl->ptr_constraints.resources =
-       eina_list_remove(comp_wl->ptr_constraints.resources, resource);
+   e_comp_wl->ptr_constraints.resources =
+     eina_list_remove(e_comp_wl->ptr_constraints.resources, resource);
 }
 
 static void
-_e_comp_wl_input_cb_bind_pointer_constraints(struct wl_client *client, void *data, uint32_t version, uint32_t id)
+_e_comp_wl_input_cb_bind_pointer_constraints(struct wl_client *client, void *data EINA_UNUSED, uint32_t version, uint32_t id)
 {
    struct wl_resource *resource;
-   E_Comp_Wl_Data *comp_wl = data;
 
    resource = wl_resource_create(client, &zwp_pointer_constraints_v1_interface, version, id);
 
@@ -1319,18 +1279,16 @@ _e_comp_wl_input_cb_bind_pointer_constraints(struct wl_client *client, void *dat
         return;
      }
 
-   comp_wl->ptr_constraints.resources =
-     eina_list_append(comp_wl->ptr_constraints.resources, resource);
+   e_comp_wl->ptr_constraints.resources =
+     eina_list_append(e_comp_wl->ptr_constraints.resources, resource);
    wl_resource_set_implementation(resource, &_e_pointer_constraints_interface,
-                                  comp_wl, _e_comp_wl_input_cb_unbind_pointer_constraints);
+                                  NULL, _e_comp_wl_input_cb_unbind_pointer_constraints);
 }
 
 static void
-_e_comp_wl_input_cb_surface_commit(void *data, E_Client *ec)
+_e_comp_wl_input_cb_surface_commit(void *data EINA_UNUSED, E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl = data;
-   if (comp_wl)
-    wl_signal_emit(&comp_wl->ptr_constraints.surface_commit_signal, ec);
+   wl_signal_emit(&e_comp_wl->ptr_constraints.surface_commit_signal, ec);
 }
 
 static void
@@ -1432,59 +1390,56 @@ _e_comp_wl_keymap_update(struct xkb_keymap *keymap, const char *keymap_path)
    /* FIXME: will be deprecated after migration */
    char *tmp;
    xkb_mod_mask_t latched = 0, locked = 0, group = 0;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return;
 
    /* unreference any existing keymap */
-   if (comp_wl->xkb.keymap)
-     xkb_map_unref(comp_wl->xkb.keymap);
+   if (e_comp_wl->xkb.keymap)
+     xkb_map_unref(e_comp_wl->xkb.keymap);
 
    /* unmap any existing keyboard area */
-   if (comp_wl->xkb.area)
-     munmap(comp_wl->xkb.area, comp_wl->xkb.size);
-   if (comp_wl->xkb.fd >= 0) close(comp_wl->xkb.fd);
+   if (e_comp_wl->xkb.area)
+     munmap(e_comp_wl->xkb.area, e_comp_wl->xkb.size);
+   if (e_comp_wl->xkb.fd >= 0) close(e_comp_wl->xkb.fd);
 
    /* unreference any existing keyboard state */
-   if (comp_wl->xkb.state)
+   if (e_comp_wl->xkb.state)
      {
         latched =
-           xkb_state_serialize_mods(comp_wl->xkb.state,
+           xkb_state_serialize_mods(e_comp_wl->xkb.state,
                                     XKB_STATE_MODS_LATCHED);
         locked =
-           xkb_state_serialize_mods(comp_wl->xkb.state,
+           xkb_state_serialize_mods(e_comp_wl->xkb.state,
                                     XKB_STATE_MODS_LOCKED);
         group =
-           xkb_state_serialize_layout(comp_wl->xkb.state,
+           xkb_state_serialize_layout(e_comp_wl->xkb.state,
                                       XKB_STATE_LAYOUT_EFFECTIVE);
-        xkb_state_unref(comp_wl->xkb.state);
+        xkb_state_unref(e_comp_wl->xkb.state);
      }
 
    /* create a new xkb state */
-   comp_wl->xkb.state = xkb_state_new(keymap);
+   e_comp_wl->xkb.state = xkb_state_new(keymap);
 
-   if (!comp_wl->xkb.state)
+   if (!e_comp_wl->xkb.state)
      {
         return;
      }
 
    if ((latched) || (locked) || (group))
-     xkb_state_update_mask(comp_wl->xkb.state, 0,
+     xkb_state_update_mask(e_comp_wl->xkb.state, 0,
                            latched, locked, 0, 0, group);
 
    /* increment keymap reference */
-   comp_wl->xkb.keymap = keymap;
+   e_comp_wl->xkb.keymap = keymap;
 
    /* fetch updated modifiers */
-   comp_wl->kbd.mod_shift =
+   e_comp_wl->kbd.mod_shift =
       xkb_map_mod_get_index(keymap, XKB_MOD_NAME_SHIFT);
-   comp_wl->kbd.mod_caps =
+   e_comp_wl->kbd.mod_caps =
       xkb_map_mod_get_index(keymap, XKB_MOD_NAME_CAPS);
-   comp_wl->kbd.mod_ctrl =
+   e_comp_wl->kbd.mod_ctrl =
       xkb_map_mod_get_index(keymap, XKB_MOD_NAME_CTRL);
-   comp_wl->kbd.mod_alt =
+   e_comp_wl->kbd.mod_alt =
       xkb_map_mod_get_index(keymap, XKB_MOD_NAME_ALT);
-   comp_wl->kbd.mod_super =
+   e_comp_wl->kbd.mod_super =
       xkb_map_mod_get_index(keymap, XKB_MOD_NAME_LOGO);
 
    if (!(tmp = xkb_map_get_as_string(keymap)))
@@ -1493,27 +1448,27 @@ _e_comp_wl_keymap_update(struct xkb_keymap *keymap, const char *keymap_path)
         return;
      }
 
-   comp_wl->xkb.size = strlen(tmp) + 1;
-   comp_wl->xkb.fd =
-      _e_comp_wl_input_keymap_fd_get(comp_wl->xkb.size);
-   if (comp_wl->xkb.fd < 0)
+   e_comp_wl->xkb.size = strlen(tmp) + 1;
+   e_comp_wl->xkb.fd =
+      _e_comp_wl_input_keymap_fd_get(e_comp_wl->xkb.size);
+   if (e_comp_wl->xkb.fd < 0)
      {
         ERR("Could not create keymap file");
         free(tmp);
         return;
      }
 
-   comp_wl->xkb.area =
-      mmap(NULL, comp_wl->xkb.size, (PROT_READ | PROT_WRITE),
-           MAP_SHARED, comp_wl->xkb.fd, 0);
-   if (comp_wl->xkb.area == MAP_FAILED)
+   e_comp_wl->xkb.area =
+      mmap(NULL, e_comp_wl->xkb.size, (PROT_READ | PROT_WRITE),
+           MAP_SHARED, e_comp_wl->xkb.fd, 0);
+   if (e_comp_wl->xkb.area == MAP_FAILED)
      {
         ERR("Failed to mmap keymap area: %m");
         free(tmp);
         return;
      }
 
-   strncpy(comp_wl->xkb.area, tmp, comp_wl->xkb.size);
+   strncpy(e_comp_wl->xkb.area, tmp, e_comp_wl->xkb.size);
    free(tmp);
 }
 
@@ -1630,22 +1585,18 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap, const char *keymap_pat
 EINTERN Eina_Bool
 e_comp_wl_input_init(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return EINA_FALSE;
-
    /* set default seat name */
-   if (!comp_wl->seat.name)
-     comp_wl->seat.name = "default";
+   if (!e_comp_wl->seat.name)
+     e_comp_wl->seat.name = "default";
 
    dont_set_e_input_keymap = getenv("NO_E_INPUT_KEYMAP_CACHE") ? EINA_TRUE : EINA_FALSE;
    dont_use_xkb_cache = getenv("NO_KEYMAP_CACHE") ? EINA_TRUE : EINA_FALSE;
 
-   g_mutex_init(&comp_wl->kbd.resource_mutex);
-   g_mutex_init(&comp_wl->kbd.repeat_delay_mutex);
-   g_mutex_init(&comp_wl->kbd.repeat_rate_mutex);
+   g_mutex_init(&e_comp_wl->kbd.resource_mutex);
+   g_mutex_init(&e_comp_wl->kbd.repeat_delay_mutex);
+   g_mutex_init(&e_comp_wl->kbd.repeat_rate_mutex);
 
-   g_mutex_init(&comp_wl->xkb.keymap_mutex);
+   g_mutex_init(&e_comp_wl->xkb.keymap_mutex);
 
    /* get default keyboard repeat delay from configuration */
    atomic_store(&e_comp_input_key->kbd.repeat_delay, e_config->keyboard.repeat_delay);
@@ -1662,50 +1613,50 @@ e_comp_wl_input_init(void)
      atomic_store(&e_comp_input_key->kbd.repeat_rate, 25);
 
    /* create the global resource for input seat */
-   comp_wl->seat.global =
-     wl_global_create(comp_wl->wl.disp, &wl_seat_interface, 4,
-                      comp_wl, _e_comp_wl_input_cb_bind_seat);
-   if (!comp_wl->seat.global)
+   e_comp_wl->seat.global =
+     wl_global_create(e_comp_wl->wl.disp, &wl_seat_interface, 4,
+                      e_comp->wl_comp_data, _e_comp_wl_input_cb_bind_seat);
+   if (!e_comp_wl->seat.global)
      {
         ERR("Could not create global for seat: %m");
         return EINA_FALSE;
      }
 
    /* create the global resource for relative pointer */
-   comp_wl->relative_ptr.global =
-     wl_global_create(comp_wl->wl.disp,
+   e_comp_wl->relative_ptr.global =
+     wl_global_create(e_comp_wl->wl.disp,
                       &zwp_relative_pointer_manager_v1_interface, 1,
-                      comp_wl,
+                      e_comp->wl_comp_data,
                       _e_comp_wl_input_cb_bind_relative_pointer_manager);
-   if (!comp_wl->relative_ptr.global)
+   if (!e_comp_wl->relative_ptr.global)
      {
         ERR("Could not create global for relative pointer: %m");
         return EINA_FALSE;
      }
 
    /* create the global resource for pointer-constraints */
-   comp_wl->ptr_constraints.global =
-     wl_global_create(comp_wl->wl.disp,
+   e_comp_wl->ptr_constraints.global =
+     wl_global_create(e_comp_wl->wl.disp,
                       &zwp_pointer_constraints_v1_interface, 1,
-                      comp_wl,
+                      e_comp->wl_comp_data,
                       _e_comp_wl_input_cb_bind_pointer_constraints);
-   if (!comp_wl->ptr_constraints.global)
+   if (!e_comp_wl->ptr_constraints.global)
      {
         ERR("Could not create global for pointer constraints: %m");
         return EINA_FALSE;
      }
 
-   comp_wl->ptr_constraints.ec = NULL;
-   comp_wl->ptr_constraints.activated = EINA_FALSE;
-   wl_signal_init(&comp_wl->ptr_constraints.pointer_destroy_signal);
-   wl_signal_init(&comp_wl->ptr_constraints.surface_unmap_signal);
-   wl_signal_init(&comp_wl->ptr_constraints.surface_commit_signal);
-   wl_signal_init(&comp_wl->ptr_constraints.surface_mousein_signal);
-   wl_signal_init(&comp_wl->ptr_constraints.surface_mouseout_signal);
+   e_comp_wl->ptr_constraints.ec = NULL;
+   e_comp_wl->ptr_constraints.activated = EINA_FALSE;
+   wl_signal_init(&e_comp_wl->ptr_constraints.pointer_destroy_signal);
+   wl_signal_init(&e_comp_wl->ptr_constraints.surface_unmap_signal);
+   wl_signal_init(&e_comp_wl->ptr_constraints.surface_commit_signal);
+   wl_signal_init(&e_comp_wl->ptr_constraints.surface_mousein_signal);
+   wl_signal_init(&e_comp_wl->ptr_constraints.surface_mouseout_signal);
 
    _surface_commit_hook = e_comp_wl_hook_add(E_COMP_WL_HOOK_CLIENT_SURFACE_COMMIT,
                                              _e_comp_wl_input_cb_surface_commit,
-                                             comp_wl);
+                                             NULL);
 
    wl_array_init(&e_comp_input_key->kbd.keys);
    wl_array_init(&e_comp_input_key->kbd.routed_keys);
@@ -1726,9 +1677,6 @@ EINTERN void
 e_comp_wl_input_shutdown(void)
 {
    struct wl_resource *res;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl) return;
 
    /* free environment variable string */
    E_FREE(_env_e_default_xkb_rules  );
@@ -1745,19 +1693,19 @@ e_comp_wl_input_shutdown(void)
      }
 
    /* destroy pointer resources */
-   EINA_LIST_FREE(comp_wl->ptr.resources, res)
+   EINA_LIST_FREE(e_comp_wl->ptr.resources, res)
      wl_resource_destroy(res);
 
    /* destroy relative pointer resources */
-   EINA_LIST_FREE(comp_wl->relative_ptr.resources, res)
+   EINA_LIST_FREE(e_comp_wl->relative_ptr.resources, res)
      wl_resource_destroy(res);
 
    /* destroy relative pointer manager resources */
-   EINA_LIST_FREE(comp_wl->relative_ptr.manager_resources, res)
+   EINA_LIST_FREE(e_comp_wl->relative_ptr.manager_resources, res)
      wl_resource_destroy(res);
 
    /* destroy pointer constraints resources */
-   EINA_LIST_FREE(comp_wl->ptr_constraints.resources, res)
+   EINA_LIST_FREE(e_comp_wl->ptr_constraints.resources, res)
      wl_resource_destroy(res);
 
    /* destroy keyboard resources */
@@ -1765,56 +1713,56 @@ e_comp_wl_input_shutdown(void)
      wl_resource_destroy(res);
    e_comp_input_key->kbd.resources = eina_list_free(e_comp_input_key->kbd.resources);
 
-   g_mutex_clear(&comp_wl->kbd.resource_mutex);
+   g_mutex_clear(&e_comp_wl->kbd.resource_mutex);
 
    /* destroy touch resources */
-   EINA_LIST_FREE(comp_wl->touch.resources, res)
+   EINA_LIST_FREE(e_comp_wl->touch.resources, res)
      wl_resource_destroy(res);
 
    /* destroy e_comp_input_key->kbd.keys array */
-   wl_array_release(&comp_wl->kbd.keys);
+   wl_array_release(&e_comp_wl->kbd.keys);
 
    wl_array_release(&e_comp_input_key->kbd.routed_keys);
 
    /* unmap any existing keyboard area */
-   if (comp_wl->xkb.area)
-     munmap(comp_wl->xkb.area, comp_wl->xkb.size);
-   if (comp_wl->xkb.fd >= 0) close(comp_wl->xkb.fd);
+   if (e_comp_wl->xkb.area)
+     munmap(e_comp_wl->xkb.area, e_comp_wl->xkb.size);
+   if (e_comp_wl->xkb.fd >= 0) close(e_comp_wl->xkb.fd);
 
    /* unreference any existing keyboard state */
-   if (comp_wl->xkb.state)
-     xkb_state_unref(comp_wl->xkb.state);
+   if (e_comp_wl->xkb.state)
+     xkb_state_unref(e_comp_wl->xkb.state);
 
    /* unreference any existing keymap */
-   if (comp_wl->xkb.keymap)
-     xkb_map_unref(comp_wl->xkb.keymap);
+   if (e_comp_wl->xkb.keymap)
+     xkb_map_unref(e_comp_wl->xkb.keymap);
 
    /* unreference any existing context */
-   if (comp_wl->xkb.context)
-     xkb_context_unref(comp_wl->xkb.context);
+   if (e_comp_wl->xkb.context)
+     xkb_context_unref(e_comp_wl->xkb.context);
 
    /* destroy the global relative pointer resource */
-   if (comp_wl->relative_ptr.global)
-     wl_global_destroy(comp_wl->relative_ptr.global);
-   comp_wl->relative_ptr.global = NULL;
+   if (e_comp_wl->relative_ptr.global)
+     wl_global_destroy(e_comp_wl->relative_ptr.global);
+   e_comp_wl->relative_ptr.global = NULL;
 
    /* destroy the global pointer constraints resource */
-   if (comp_wl->ptr_constraints.global)
-     wl_global_destroy(comp_wl->ptr_constraints.global);
-   comp_wl->ptr_constraints.global = NULL;
+   if (e_comp_wl->ptr_constraints.global)
+     wl_global_destroy(e_comp_wl->ptr_constraints.global);
+   e_comp_wl->ptr_constraints.global = NULL;
 
    /* destroy the global seat resource */
-   if (comp_wl->seat.global)
-     wl_global_destroy(comp_wl->seat.global);
-   comp_wl->seat.global = NULL;
+   if (e_comp_wl->seat.global)
+     wl_global_destroy(e_comp_wl->seat.global);
+   e_comp_wl->seat.global = NULL;
 
    dont_set_e_input_keymap = EINA_FALSE;
    dont_use_xkb_cache = EINA_FALSE;
 
-   g_mutex_clear(&comp_wl->xkb.keymap_mutex);
+   g_mutex_clear(&e_comp_wl->xkb.keymap_mutex);
 
-   g_mutex_clear(&comp_wl->kbd.repeat_delay_mutex);
-   g_mutex_clear(&comp_wl->kbd.repeat_rate_mutex);
+   g_mutex_clear(&e_comp_wl->kbd.repeat_delay_mutex);
+   g_mutex_clear(&e_comp_wl->kbd.repeat_rate_mutex);
 }
 
 EINTERN Eina_Bool
@@ -1896,16 +1844,14 @@ e_comp_wl_input_keyboard_modifiers_update(void)
    uint32_t serial;
    struct wl_resource *res;
    Eina_List *l;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   if (!comp_wl) return;
    if (!e_comp_wl_input_keyboard_modifiers_serialize()) return;
    if (!e_comp_input_key->kbd.focused)
      {
        return;
      }
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    EINA_LIST_FOREACH(e_comp_input_key->kbd.focused, l, res)
      wl_keyboard_send_modifiers(res, serial,
                                 e_comp_input_key->kbd.mod_depressed,
@@ -1935,16 +1881,15 @@ e_comp_wl_input_keyboard_state_update(uint32_t keycode, Eina_Bool pressed)
 EINTERN void
 e_comp_wl_input_pointer_enabled_set(Eina_Bool enabled)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    /* check for valid compositor data */
-   if (!comp_wl)
+   if (!e_comp->wl_comp_data)
      {
         ERR("No compositor data");
         return;
      }
 
-   comp_wl->ptr.enabled = !!enabled;
-   _e_comp_wl_input_update_seat_caps(comp_wl, NULL);
+   e_comp_wl->ptr.enabled = !!enabled;
+   _e_comp_wl_input_update_seat_caps(NULL);
 }
 
 static void
@@ -1961,16 +1906,15 @@ _e_comp_wl_input_thread_cb_keyboard_enabled_set(void *data)
 EINTERN void
 e_comp_wl_input_keyboard_enabled_set(Eina_Bool enabled)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    /* check for valid compositor data */
-   if (!comp_wl)
+   if (!e_comp->wl_comp_data)
      {
         ERR("No compositor data");
         return;
      }
 
    e_input_backend_thread_safe_call(_e_comp_wl_input_thread_cb_keyboard_enabled_set, &enabled, sizeof(Eina_Bool));
-   _e_comp_wl_input_update_seat_caps(comp_wl, NULL);
+   _e_comp_wl_input_update_seat_caps(NULL);
 }
 
 E_API Eina_Bool
@@ -2208,40 +2152,38 @@ e_comp_wl_input_keymap_default_options_get(void)
 EINTERN void
 e_comp_wl_input_touch_enabled_set(Eina_Bool enabled)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    /* check for valid compositor data */
-   if (!comp_wl)
+   if (!e_comp->wl_comp_data)
      {
         ERR("No compositor data");
         return;
      }
 
-   comp_wl->touch.enabled = !!enabled;
-   _e_comp_wl_input_update_seat_caps(comp_wl, NULL);
+   e_comp_wl->touch.enabled = !!enabled;
+   _e_comp_wl_input_update_seat_caps(NULL);
 }
 
 EINTERN void
 e_comp_wl_input_seat_caps_set(unsigned int caps)
 {
    Eina_Bool need_update = EINA_FALSE;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    /* check for valid compositor data */
-   if (!comp_wl)
+   if (!e_comp->wl_comp_data)
      {
         ERR("No compositor data");
         return;
      }
 
    if (caps & E_INPUT_SEAT_POINTER)
-     comp_wl->ptr.enabled = need_update = EINA_TRUE;
+     e_comp_wl->ptr.enabled = need_update = EINA_TRUE;
    if (caps & E_INPUT_SEAT_KEYBOARD)
      e_comp_input_key->kbd.enabled = need_update = EINA_TRUE;
    if (caps & E_INPUT_SEAT_TOUCH)
-     comp_wl->touch.enabled = need_update = EINA_TRUE;
+     e_comp_wl->touch.enabled = need_update = EINA_TRUE;
 
    if (need_update)
-     _e_comp_wl_input_update_seat_caps(comp_wl, NULL);
+     _e_comp_wl_input_update_seat_caps(NULL);
 }
 
 EINTERN Eina_Bool
@@ -2257,6 +2199,8 @@ e_comp_wl_input_keyboard_repeat_set(int delay, int rate)
    struct wl_resource *res;
    Eina_List *l;
 
+   EINA_SAFETY_ON_NULL_RETURN(e_comp_wl);
+
    atomic_store(&e_comp_input_key->kbd.repeat_delay, delay);
    atomic_store(&e_comp_input_key->kbd.repeat_rate, rate);
 
@@ -2310,6 +2254,7 @@ e_comp_wl_input_keymap_keyname_to_keycode(const char * name)
    char *name_tmp;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(name, 0);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, 0);
 
    g_rec_mutex_lock(&e_comp_input_key->xkb.keymap_mutex);
    keymap = e_comp_input_key->xkb.keymap;
@@ -2351,7 +2296,7 @@ e_comp_wl_input_keymap_keycode_to_keyname(int keycode)
    char name[256] = {0, };
 
    EINA_SAFETY_ON_FALSE_RETURN_VAL(8 <= keycode, NULL);
-
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, NULL);
    g_rec_mutex_lock(&e_comp_input_key->xkb.keymap_mutex);
    if (!e_comp_input_key->xkb.state)
      {
@@ -2429,12 +2374,7 @@ cleanup:
 E_API Eina_Bool
 e_comp_wl_input_pointer_constraint_activated_get(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (comp_wl)
-     return comp_wl->ptr_constraints.activated;
-
-  return EINA_FALSE;
+   return e_comp_wl->ptr_constraints.activated;
 }
 
 EINTERN void
index 25fdbd3f56fd6f734118b37041ceeb8c64c6349b..737bb6cb698677eb8c1cdb3ba94f7646a52bb64b 100644 (file)
@@ -6,7 +6,7 @@
 #include "e_policy_wl.h"
 #include "e_device_intern.h"
 
-EINTERN E_Comp_Wl_Data *e_comp_wl_init(void);
+EINTERN Eina_Bool       e_comp_wl_init(void);
 EINTERN void            e_comp_wl_shutdown(void);
 EINTERN E_Comp_Wl_Data *e_comp_wl_get(void);
 
@@ -29,8 +29,8 @@ EINTERN Eina_Bool e_comp_wl_key_send(E_Client *ec, int keycode, Eina_Bool presse
 EINTERN Eina_Bool e_comp_wl_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, uint32_t time);
 EINTERN Eina_Bool e_comp_wl_key_process(Ecore_Event_Key *ev, E_Device *dev, int type);
 
-EINTERN E_Client* e_comp_wl_touch_frame_send_ec_get(E_Comp_Wl_Data *comp_wl);
-EINTERN void      e_comp_wl_touch_frame_send_ec_set(E_Comp_Wl_Data *comp_wl, E_Client *ec);
+EINTERN E_Client* e_comp_wl_touch_frame_send_ec_get(void);
+EINTERN void      e_comp_wl_touch_frame_send_ec_set(E_Client *ec);
 
 EINTERN Eina_Bool e_comp_wl_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
 EINTERN Eina_Bool e_comp_wl_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, uint32_t time);
@@ -47,7 +47,7 @@ EINTERN void      e_comp_wl_mouse_out_renew(E_Client *ec, int buttons, int x, in
 EINTERN void e_comp_wl_send_event_device(struct wl_client *wc, uint32_t timestamp, Ecore_Device *dev, uint32_t serial);
 EINTERN void e_comp_wl_send_event_e_device(struct wl_client *wc, uint32_t timestamp, E_Device *dev, uint32_t serial);
 
-EINTERN Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, E_Comp_Wl_Data *comp_wl, uint32_t timestamp, uint32_t button_id, uint32_t state);
+EINTERN Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state);
 
 EINTERN void e_comp_wl_shell_surface_ready(E_Client *ec);
 
index 9d3dc555fb42c7e2a5a33994d5aef193d69aa9fc..667c3b798cd6ef0cbf32b4ad4b8b01fd9246b82b 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_comp_wl_renderer_intern.h"
-#include "e_comp_wl_intern.h"
 
 #include <libds-tizen/renderer.h>
 
@@ -119,17 +118,15 @@ _renderer_info_wrapper_cb_renderer_info_destroy(struct wl_listener *listener, vo
 EINTERN Eina_Bool
 e_comp_wl_renderer_init(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->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 (renderer_mgr) return EINA_TRUE;
 
    renderer_mgr = E_NEW(Ds_Tizen_Renderer_Mgr, 1);
    EINA_SAFETY_ON_NULL_GOTO(renderer_mgr, fail);
 
-   renderer_mgr->renderer = ds_tizen_renderer_create(comp_wl->wl.disp);
+   renderer_mgr->renderer = ds_tizen_renderer_create(e_comp_wl->wl.disp);
    EINA_SAFETY_ON_NULL_GOTO(renderer_mgr->renderer, fail);
 
    renderer_mgr->renderer_info_get.notify = _renderer_mgr_cb_renderer_info_get;
index 195d564ead2243662b925ea90b234d393995aab5..21672e9a798d83c74a605d386c3fa37550f6bbdc 100644 (file)
@@ -318,7 +318,7 @@ _remote_provider_onscreen_parent_calculate(E_Comp_Wl_Remote_Provider *provider)
    if (!zone) return;
    if (!provider->common.surfaces) return;
 
-   o = evas_object_top_get(e_comp_evas_get());
+   o = evas_object_top_get(e_comp->evas);
    for (; o; o = evas_object_below_get(o))
      {
         _ec = evas_object_data_get(o, "E_Client");
@@ -3622,16 +3622,15 @@ EINTERN Eina_Bool
 e_comp_wl_remote_surface_init(void)
 {
    E_Comp_Wl_Remote_Manager *rs_manager = NULL;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->wl.disp, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->tbm.server, 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);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->wl_comp_data->tbm.server, EINA_FALSE);
 
    rs_manager = E_NEW(E_Comp_Wl_Remote_Manager, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(rs_manager, EINA_FALSE);
 
-   rs_manager->global = wl_global_create(comp_wl->wl.disp,
+   rs_manager->global = wl_global_create(e_comp_wl->wl.disp,
                                          &tizen_remote_surface_manager_interface,
                                          6,
                                          NULL,
index c4b8c64cc5b0e1e8a4c2d21614f43aae799080a5..80cef59d6dff4807e068e77e14ec78aeee6dad5f 100644 (file)
@@ -2,7 +2,6 @@
 #include "e_privilege_intern.h"
 #include "e_output_intern.h"
 #include "e_comp_wl_video_buffer_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_util_video_intern.h"
 #include "e_security_intern.h"
 
@@ -96,11 +95,8 @@ _e_screenmirror_privilege_check(struct wl_client *client)
 static Eina_Bool
 _e_tz_screenmirror_buffer_check(struct wl_resource *resource)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (!comp_wl) return EINA_FALSE;
-
    if (wl_shm_buffer_get(resource) ||
-       wayland_tbm_server_get_surface(comp_wl->tbm.server, resource))
+       wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server, resource))
      return EINA_TRUE;
 
    ERR("unrecognized buffer");
@@ -995,12 +991,11 @@ _e_screenshooter_cb_bind(struct wl_client *client, void *data, uint32_t version,
 EINTERN int
 e_comp_wl_screenshooter_init(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (!comp_wl) return 0;
-   if (!comp_wl->wl.disp) return 0;
+   if (!e_comp_wl) return 0;
+   if (!e_comp_wl->wl.disp) return 0;
 
    /* try to add screenshooter to wayland globals */
-   if (!wl_global_create(comp_wl->wl.disp, &screenshooter_interface, 2,
+   if (!wl_global_create(e_comp_wl->wl.disp, &screenshooter_interface, 2,
                          NULL, _e_screenshooter_cb_bind))
      {
         ERR("Could not add screenshooter to wayland globals");
@@ -1008,7 +1003,7 @@ e_comp_wl_screenshooter_init(void)
      }
 
    /* try to add tizen_screenshooter to wayland globals */
-   if (!wl_global_create(comp_wl->wl.disp, &tizen_screenshooter_interface, 3,
+   if (!wl_global_create(e_comp_wl->wl.disp, &tizen_screenshooter_interface, 3,
                          NULL, _e_tz_screenshooter_cb_bind))
      {
         ERR("Could not add tizen_screenshooter to wayland globals");
index 889e4819f054ae3c4a5febccd41d5e827f0d35cd..6cf65d4edf03581a284efc574a6571d85c8bdffa 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_bindings_intern.h"
 #include "e_xdg_shell_v6_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_comp_wl_rsm_intern.h"
 #include "e_comp_wl_shell_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
@@ -154,18 +153,14 @@ e_shell_e_client_toplevel_set(E_Client *ec)
 EINTERN void
 e_shell_e_client_popup_set(E_Client *ec)
 {
-   E_Comp *comp;
    EINA_SAFETY_ON_NULL_RETURN(ec);
 
-   comp = e_comp_get();
-   EINA_SAFETY_ON_NULL_RETURN(comp);
-
    ELOGF("SHELL", "Set popup", ec);
 
    EC_CHANGED(ec);
    ec->new_client = ec->override = 1;
    e_client_unignore(ec);
-   comp->new_clients++;
+   e_comp->new_clients++;
    if (!ec->internal)
      ec->borderless = 1;
    ec->lock_border = EINA_TRUE;
@@ -298,10 +293,8 @@ e_shell_e_client_interactive_move(E_Client *ec,
                                   struct wl_resource *seat EINA_UNUSED)
 {
    E_Binding_Event_Mouse_Button ev;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
 
    if ((ec->maximized) || (ec->fullscreen))
      {
@@ -313,17 +306,17 @@ e_shell_e_client_interactive_move(E_Client *ec,
 
    e_client_layout_apply(ec, EINA_FALSE);
 
-   switch (comp_wl->ptr.button)
+   switch (e_comp_wl->ptr.button)
      {
       case BTN_LEFT:    ev.button = 1; break;
       case BTN_MIDDLE:  ev.button = 2; break;
       case BTN_RIGHT:   ev.button = 3; break;
-      default:          ev.button = comp_wl->ptr.button; break;
+      default:          ev.button = e_comp_wl->ptr.button; break;
      }
 
    e_view_client_frame_xy_unadjust(e_client_view_get(ec),
-                                   wl_fixed_to_int(comp_wl->ptr.x),
-                                   wl_fixed_to_int(comp_wl->ptr.y),
+                                   wl_fixed_to_int(e_comp_wl->ptr.x),
+                                   wl_fixed_to_int(e_comp_wl->ptr.y),
                                    &ev.canvas.x,
                                    &ev.canvas.y);
 
@@ -342,10 +335,8 @@ e_shell_e_client_interactive_resize(E_Client *ec,
                                     uint32_t edges)
 {
    E_Binding_Event_Mouse_Button ev;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
 
    if ((edges == 0) || (edges > 15) ||
        ((edges & 3) == 3) || ((edges & 12) == 12))
@@ -361,22 +352,22 @@ e_shell_e_client_interactive_resize(E_Client *ec,
 
    e_client_layout_apply(ec, EINA_FALSE);
 
-   comp_wl->resize.resource = resource;
-   comp_wl->resize.edges = edges;
-   comp_wl->ptr.grab_x = comp_wl->ptr.x - wl_fixed_from_int(ec->client.x);
-   comp_wl->ptr.grab_y = comp_wl->ptr.y - wl_fixed_from_int(ec->client.y);
+   e_comp_wl->resize.resource = resource;
+   e_comp_wl->resize.edges = edges;
+   e_comp_wl->ptr.grab_x = e_comp_wl->ptr.x - wl_fixed_from_int(ec->client.x);
+   e_comp_wl->ptr.grab_y = e_comp_wl->ptr.y - wl_fixed_from_int(ec->client.y);
 
-   switch (comp_wl->ptr.button)
+   switch (e_comp_wl->ptr.button)
      {
       case BTN_LEFT:   ev.button = 1; break;
       case BTN_MIDDLE: ev.button = 2; break;
       case BTN_RIGHT:  ev.button = 3; break;
-      default:         ev.button = comp_wl->ptr.button; break;
+      default:         ev.button = e_comp_wl->ptr.button; break;
      }
 
    e_view_client_frame_xy_unadjust(e_client_view_get(ec),
-                                   wl_fixed_to_int(comp_wl->ptr.x),
-                                   wl_fixed_to_int(comp_wl->ptr.y),
+                                   wl_fixed_to_int(e_comp_wl->ptr.x),
+                                   wl_fixed_to_int(e_comp_wl->ptr.y),
                                    &ev.canvas.x,
                                    &ev.canvas.y);
 
@@ -726,10 +717,9 @@ _e_shell_surface_ping(struct wl_resource *resource)
 {
    E_Client *ec;
    uint32_t serial;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   if (!resource) return;
-   if (!comp_wl) return;
+   if (!resource)
+     return;
 
    /* get the client for this resource */
    if (!(ec = wl_resource_get_user_data(resource)))
@@ -740,7 +730,7 @@ _e_shell_surface_ping(struct wl_resource *resource)
         return;
      }
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_shell_surface_send_ping(ec->comp_data->shell.surface, serial);
 }
 
@@ -943,10 +933,8 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges
    E_Client *ec;
    struct wl_array states;
    uint32_t serial;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    if (!resource) return;
-   if (!comp_wl) return;
 
    /* get the client for this resource */
    if (!(ec = wl_resource_get_user_data(resource)))
@@ -988,7 +976,7 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges
 
    if (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU)
      {
-        serial = wl_display_next_serial(comp_wl->wl.disp);
+        serial = wl_display_next_serial(e_comp_wl->wl.disp);
         xdg_surface_send_configure(resource, width, height, &states, serial);
      }
 
@@ -1312,10 +1300,9 @@ _e_xdg_shell_surface_ping(struct wl_resource *resource)
    uint32_t serial;
    struct wl_client *client;
    E_Xdg_Shell *esh;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   if (!resource) return;
-   if (!comp_wl) return;
+   if (!resource)
+     return;
 
    /* get the client for this resource */
    if (!(ec = wl_resource_get_user_data(resource)))
@@ -1335,7 +1322,7 @@ _e_xdg_shell_surface_ping(struct wl_resource *resource)
    if (!eina_list_data_find(esh->ping_ecs, ec))
      esh->ping_ecs = eina_list_append(esh->ping_ecs, ec);
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    xdg_shell_send_ping(esh->res, serial);
 }
 
@@ -1759,12 +1746,9 @@ _e_shell_cb_unbind(struct wl_resource *resource EINA_UNUSED)
 }
 
 static void
-_e_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
+_e_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t version, uint32_t id)
 {
    struct wl_resource *res;
-   E_Comp_Wl_Data *comp_wl = data;
-
-   if (!comp_wl) return;
 
    if (!(res = wl_resource_create(client, &wl_shell_interface, version, id)))
      {
@@ -1774,16 +1758,15 @@ _e_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_
 
    wl_resource_set_implementation(res,
                                   &_e_shell_interface,
-                                  comp_wl,
+                                  e_comp->wl_comp_data,
                                   _e_shell_cb_unbind);
 }
 
 static void
-_e_xdg_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
+_e_xdg_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t version, uint32_t id)
 {
    E_Xdg_Shell *esh;
    struct wl_resource *res;
-   E_Comp_Wl_Data *comp_wl = data;
 
    res = wl_resource_create(client, &xdg_shell_interface, version, id);
    EINA_SAFETY_ON_NULL_GOTO(res, err);
@@ -1798,7 +1781,7 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uin
    wl_resource_set_dispatcher(res,
                               _e_xdg_shell_cb_dispatch,
                               NULL,
-                              comp_wl,
+                              e_comp->wl_comp_data,
                               NULL);
 
    return;
@@ -1873,48 +1856,43 @@ _e_tz_surf_cb_bind(struct wl_client *client, void *data, uint32_t version, uint3
 
    wl_resource_set_implementation(res,
                                   &_e_tz_surf_interface,
-                                  data,
+                                  e_comp->wl_comp_data,
                                   NULL);
 }
 
 EINTERN Eina_Bool
 e_comp_wl_shell_init(void)
 {
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get()))
-     return EINA_FALSE;
-
-   if (!wl_global_create(comp_wl->wl.disp,
+   if (!wl_global_create(e_comp_wl->wl.disp,
                          &wl_shell_interface,
                          1,
-                         comp_wl,
+                         e_comp->wl_comp_data,
                          _e_shell_cb_bind))
      {
         ERR("Could not create shell global: %m");
         return EINA_FALSE;
      }
 
-   if (!wl_global_create(comp_wl->wl.disp,
+   if (!wl_global_create(e_comp_wl->wl.disp,
                          &xdg_shell_interface,
                          1,
-                         comp_wl,
+                         e_comp->wl_comp_data,
                          _e_xdg_shell_cb_bind))
      {
         ERR("Could not create xdg_shell global: %m");
         return EINA_FALSE;
      }
 
-   if (!e_xdg_shell_v6_init(comp_wl->wl.disp))
+   if (!e_xdg_shell_v6_init())
      {
         ERR("Could not init xdg_shell_v6");
         return EINA_FALSE;
      }
 
-   if (!wl_global_create(comp_wl->wl.disp,
+   if (!wl_global_create(e_comp_wl->wl.disp,
                          &tizen_surface_interface,
                          1,
-                         comp_wl,
+                         e_comp->wl_comp_data,
                          _e_tz_surf_cb_bind))
      {
         ERR("Could not create tizen_surface to wayland globals: %m");
index 1097159eb694b348dc3a0318a44350e771be00cc..85130f9426913eaddf2fd38f3daed03e08966717 100644 (file)
@@ -1,6 +1,5 @@
 #include "e_comp_wl_subsurface_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_comp_wl_viewport_intern.h"
 #include "e_pixmap_intern.h"
 #include "e_client_video_intern.h"
@@ -29,7 +28,7 @@ static void       _e_comp_wl_subsurface_commit_from_cache(E_Client *ec);
 static void       _e_comp_wl_subsurface_stack_update(E_Client *ec);
 
 static void
-_e_comp_wl_client_subsurface_set(E_Comp* comp, E_Client *ec, E_Comp_Wl_Subsurf_Data *sdata)
+_e_comp_wl_client_subsurface_set(E_Client *ec, E_Comp_Wl_Subsurf_Data *sdata)
 {
    e_comp_wl_client_surface_set(ec, ec->comp_data->wl_surface);
    ec->comp_data->sub.data = sdata;
@@ -55,7 +54,7 @@ _e_comp_wl_client_subsurface_set(E_Comp* comp, E_Client *ec, E_Comp_Wl_Subsurf_D
    EC_CHANGED(ec);
 
    ec->new_client = ec->netwm.ping = EINA_TRUE;
-   comp->new_clients++;
+   e_comp->new_clients++;
    e_client_unignore(ec);
 }
 
@@ -134,10 +133,6 @@ _subsurface_data_parent_unset(E_Comp_Wl_Subsurf_Data *sdata)
 EINTERN void
 e_comp_wl_subsurface_data_init(E_Comp_Wl_Subsurf_Data *sdata, E_Client *ec, E_Client *parent, E_Client *offscreen_parent)
 {
-   E_Comp *comp = e_comp_get();
-
-   EINA_SAFETY_ON_NULL_RETURN(comp);
-
    sdata->cached_buffer_ref.buffer = NULL;
    sdata->synchronized = EINA_TRUE;
    sdata->parent = parent;
@@ -147,7 +142,7 @@ e_comp_wl_subsurface_data_init(E_Comp_Wl_Subsurf_Data *sdata, E_Client *ec, E_Cl
 
    e_comp_wl_surface_state_init(&sdata->cached, ec->w, ec->h);
 
-   _e_comp_wl_client_subsurface_set(comp, ec, sdata);
+   _e_comp_wl_client_subsurface_set(ec, sdata);
    _e_comp_wl_client_subsurface_parent_set(ec, parent);
 
    e_comp_wl_hook_call(E_COMP_WL_HOOK_SUBSURFACE_CREATE, ec);
index c58f68353f333300e6c6dadc6c34db265bd52935..6d85eaae6c72be1f9b8504722d541787c1d63508 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_comp_wl_tbm_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_tbm_gbm_server_intern.h"
 #include "e_utils_intern.h"
 #include "e_comp_screen_intern.h"
@@ -171,19 +170,18 @@ e_comp_wl_tbm_egl_image_buffer_get(int width, int height, tbm_format format, int
 EINTERN Eina_Bool
 e_comp_wl_tbm_init(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (!comp_wl)
+   if (!e_comp)
      {
         e_error_message_show(_("Enlightenment cannot has no e_comp at Wayland TBM!\n"));
         return EINA_FALSE;
      }
 
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(comp_wl->wl.disp, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(e_comp->wl_comp_data->wl.disp, EINA_FALSE);
 
-   if (comp_wl->tbm.server)
+   if (e_comp->wl_comp_data->tbm.server)
       return EINA_TRUE;
 
-   if (!e_tbm_gbm_server_init(comp_wl->wl.disp))
+   if (!e_tbm_gbm_server_init(e_comp->wl_comp_data->wl.disp))
      {
         e_error_message_show(_("Enlightenment cannot initialize E_Tbm_Gbm_Server!!\n"));
         return EINA_FALSE;
@@ -204,15 +202,13 @@ e_comp_wl_tbm_remote_buffer_get(struct wl_resource *wl_tbm, struct wl_resource *
 {
    struct wl_resource *remote_buffer;
    tbm_surface_h tbm_surface;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(wl_tbm, NULL);
    EINA_SAFETY_ON_NULL_RETURN_VAL(wl_buffer,  NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, NULL);
 
-   tbm_surface = wayland_tbm_server_get_surface(comp_wl->tbm.server,
+   tbm_surface = wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server,
                                                 wl_buffer);
-   remote_buffer = wayland_tbm_server_export_buffer(comp_wl->tbm.server,
+   remote_buffer = wayland_tbm_server_export_buffer(e_comp->wl_comp_data->tbm.server,
                                                     wl_tbm, tbm_surface);
 
    return remote_buffer;
@@ -222,13 +218,11 @@ EINTERN struct wl_resource *
 e_comp_wl_tbm_remote_buffer_get_with_tbm(struct wl_resource *wl_tbm, tbm_surface_h tbm_surface)
 {
    struct wl_resource *remote_buffer;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(wl_tbm, NULL);
    EINA_SAFETY_ON_NULL_RETURN_VAL(tbm_surface,  NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl,  NULL);
 
-   remote_buffer = wayland_tbm_server_export_buffer(comp_wl->tbm.server,
+   remote_buffer = wayland_tbm_server_export_buffer(e_comp->wl_comp_data->tbm.server,
                                                     wl_tbm, tbm_surface);
 
    return remote_buffer;
@@ -320,11 +314,12 @@ e_comp_wl_tbm_import_gbm_bo(void *gbo)
    tbm_bo tbo = NULL;
    int fd = -1;
    Eina_Bool need_close = EINA_FALSE;
-   E_Comp_Screen *comp_screen = e_comp_screen_get();
+   E_Comp_Screen *e_comp_screen = e_comp_screen_get();
    int i;
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen->bufmgr, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->bufmgr, NULL);
 
    info.width = gbm_bo_get_width(gbo);
    info.height = gbm_bo_get_height(gbo);
@@ -341,7 +336,7 @@ e_comp_wl_tbm_import_gbm_bo(void *gbo)
    fd = _e_comp_wl_tbm_gbm_bo_fd_get(gbo, &need_close);
    EINA_SAFETY_ON_FALSE_GOTO(fd >= 0, end);
 
-   tbo = tbm_bo_import_fd(comp_screen->bufmgr, fd);
+   tbo = tbm_bo_import_fd(e_comp_screen->bufmgr, fd);
    EINA_SAFETY_ON_NULL_GOTO(tbo, end);
 
    tsurface = tbm_surface_internal_create_with_bos(&info, &tbo, 1);
@@ -386,17 +381,17 @@ EINTERN struct wayland_tbm_client_queue *
 e_comp_wl_tbm_client_queue_get(E_Client *ec)
 {
    struct wayland_tbm_client_queue * cqueue;
+   E_Comp_Wl_Data *wl_cdata = (E_Comp_Wl_Data *)e_comp->wl_comp_data;
    E_Comp_Wl_Client_Data *cdata;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(wl_cdata, NULL);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
 
    cdata = e_pixmap_cdata_get(ec->pixmap);
    if (!cdata) return NULL;
    if (!cdata->wl_surface) return NULL;
 
-   cqueue = wayland_tbm_server_client_queue_get(comp_wl->tbm.server, cdata->wl_surface);
+   cqueue = wayland_tbm_server_client_queue_get(wl_cdata->tbm.server, cdata->wl_surface);
 
    return cqueue;
 }
index 5d372d49a855ff1a812200015bde90269e120809..39ec3b35a375a6f9a189945b99b19bc99798410d 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_comp_wl_tizen_hwc_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_utils_intern.h"
 #include "e_error_intern.h"
 #include "e_hwc_window_intern.h"
@@ -322,22 +321,21 @@ _e_comp_wl_tizen_hwc_cb_bind(struct wl_client *client, void *data, uint32_t vers
 EINTERN Eina_Bool
 e_comp_wl_tizen_hwc_init(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (!comp_wl)
+   if (!e_comp_wl)
      {
-        e_error_message_show(_("Enlightenment cannot has no comp_wl at Wayland Tizen HWC!\n"));
+        e_error_message_show(_("Enlightenment cannot has no e_comp_wl at Wayland Tizen HWC!\n"));
         return EINA_FALSE;
      }
 
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(comp_wl->wl.disp, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(e_comp_wl->wl.disp, EINA_FALSE);
 
-   if (comp_wl->tizen_hwc.global)
+   if (e_comp_wl->tizen_hwc.global)
       return EINA_TRUE;
 
    /* create the global resource for tizen_hwc */
-   comp_wl->tizen_hwc.global = wl_global_create(comp_wl->wl.disp, &tizen_hwc_interface, 1,
+   e_comp_wl->tizen_hwc.global = wl_global_create(e_comp_wl->wl.disp, &tizen_hwc_interface, 1,
                                                   NULL, _e_comp_wl_tizen_hwc_cb_bind);
-   if (!comp_wl->tizen_hwc.global)
+   if (!e_comp_wl->tizen_hwc.global)
      {
         ERR("Could not create global for tizen_hwc: %m");
         return EINA_FALSE;
@@ -354,12 +352,11 @@ e_comp_wl_tizen_hwc_shutdown(void)
    E_Comp_Wl_Tizen_Hwc *tizen_hwc;
    E_Comp_Wl_Tizen_Hwc_Commit_Feedback *hwc_commit_feedback;
    const Eina_List *l, *ll, *lll, *llll;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    ELOGF("TIZEN-HWC", "Shutdown Tizen HWC.", NULL);
 
-   if (!comp_wl) return;
-   if (!comp_wl->tizen_hwc.global) return;
+   if (!e_comp_wl) return;
+   if (!e_comp_wl->tizen_hwc.global) return;
 
    EINA_LIST_FOREACH_SAFE(_e_comp_wl_tizen_hwc_list, l, ll, tizen_hwc)
      {
@@ -370,8 +367,8 @@ e_comp_wl_tizen_hwc_shutdown(void)
      }
    _e_comp_wl_tizen_hwc_list = NULL;
 
-   wl_global_destroy(comp_wl->tizen_hwc.global);
-   comp_wl->tizen_hwc.global = NULL;
+   wl_global_destroy(e_comp_wl->tizen_hwc.global);
+   e_comp_wl->tizen_hwc.global = NULL;
 }
 
 EINTERN void
index 36aec2c2cfe8a9bc755eb31b3abf156a9903f90e..de25e3c882f5efb407bde9fbd29699824b056648 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_info_server_intern.h"
 #include "e_comp_wl_video_buffer_intern.h"
 #include "e_zone_video_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_comp_wl_viewport_intern.h"
 #include "e_utils_intern.h"
 #include "e_client_intern.h"
@@ -440,14 +439,13 @@ EINTERN Eina_Bool
 e_comp_wl_video_init(void)
 {
    struct wl_global *global;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   if (!comp_wl) return EINA_FALSE;
-   if (!comp_wl->wl.disp) return EINA_FALSE;
-   if (comp_wl->video.global) return EINA_TRUE;
+   if (!e_comp_wl) return EINA_FALSE;
+   if (!e_comp_wl->wl.disp) return EINA_FALSE;
+   if (e_comp->wl_comp_data->video.global) return EINA_TRUE;
 
    /* try to add tizen_video to wayland globals */
-   global = wl_global_create(comp_wl->wl.disp, &tizen_video_interface,
+   global = wl_global_create(e_comp_wl->wl.disp, &tizen_video_interface,
                              1, NULL, _e_comp_wl_tizen_video_bind);
    if (!global)
      {
@@ -455,12 +453,12 @@ e_comp_wl_video_init(void)
         return EINA_FALSE;
      }
 
-   comp_wl->video.global = global;
+   e_comp->wl_comp_data->video.global = global;
 
-   comp_wl->available_hw_accel.underlay = EINA_TRUE;
+   e_comp->wl_comp_data->available_hw_accel.underlay = EINA_TRUE;
    DBG("enable HW underlay");
 
-   comp_wl->available_hw_accel.scaler = EINA_TRUE;
+   e_comp->wl_comp_data->available_hw_accel.scaler = EINA_TRUE;
    DBG("enable HW scaler");
 
    e_info_server_hook_set("vbuf", _e_comp_wl_video_info_cb_vbuf_print, NULL);
@@ -473,13 +471,10 @@ e_comp_wl_video_init(void)
 EINTERN void
 e_comp_wl_video_shutdown(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (!comp_wl) return;
+   e_comp->wl_comp_data->available_hw_accel.underlay = EINA_FALSE;
+   e_comp->wl_comp_data->available_hw_accel.scaler = EINA_FALSE;
 
-   comp_wl->available_hw_accel.underlay = EINA_FALSE;
-   comp_wl->available_hw_accel.scaler = EINA_FALSE;
-
-   E_FREE_FUNC(comp_wl->video.global, wl_global_destroy);
+   E_FREE_FUNC(e_comp->wl_comp_data->video.global, wl_global_destroy);
 
    e_info_server_hook_set("vbuf", NULL, NULL);
    e_info_server_hook_set("video-to-primary", NULL, NULL);
index ded6b1b1a881d50fed6061b1cedd3d8420fdfd1f..3d7dd58a824d553724d0adde28424bd78a6ed4cd 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_comp_wl_video_buffer_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_compositor_intern.h"
 #include "e_util_video_intern.h"
 
@@ -150,13 +149,11 @@ _e_comp_wl_video_buffer_access_data_end(E_Comp_Wl_Video_Buf *vbuf)
 static E_Comp_Wl_Video_Buf*
 _e_comp_wl_video_buffer_create_res(struct wl_resource *resource)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    E_Comp_Wl_Video_Buf *vbuf = NULL;
    struct wl_shm_buffer *shm_buffer;
    tbm_surface_h tbm_surface;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(resource, NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, NULL);
 
    vbuf = calloc(1, sizeof(E_Comp_Wl_Video_Buf));
    EINA_SAFETY_ON_FALSE_GOTO(vbuf != NULL, create_fail);
@@ -188,7 +185,7 @@ _e_comp_wl_video_buffer_create_res(struct wl_resource *resource)
         vbuf->width_from_pitch = vbuf->width;
         vbuf->height_from_size = vbuf->height;;
      }
-   else if ((tbm_surface = wayland_tbm_server_get_surface(comp_wl->tbm.server, resource)))
+   else if ((tbm_surface = wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server, resource)))
      {
         int i;
 
index dc07f782d7ec7a37ed40a8a924a5525dac10a3f7..31b8decfa84344d4779655957ece7eec81feeeda 100644 (file)
@@ -1786,7 +1786,7 @@ _e_comp_wl_viewport_print(void *data, const char *log_path)
    setvbuf(log_fl, NULL, _IOLBF, 512);
 
    // append clients.
-   for (o = evas_object_top_get(e_comp_evas_get()); o; o = evas_object_below_get(o))
+   for (o = evas_object_top_get(e_comp->evas); o; o = evas_object_below_get(o))
      {
         E_Client *ec;
         E_Viewport *viewport;
@@ -1872,12 +1872,10 @@ _e_comp_wl_viewport_print(void *data, const char *log_path)
 EINTERN int
 e_comp_wl_viewport_init(void)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
+   if (!e_comp_wl) return 0;
+   if (!e_comp_wl->wl.disp) return 0;
 
-   if (!comp_wl) return 0;
-   if (!comp_wl->wl.disp) return 0;
-
-   if (!ds_tizen_scaler_create(comp_wl->wl.disp))
+   if (!ds_tizen_scaler_create(e_comp_wl->wl.disp))
      {
         ERR("Could not create ds_tizen_scaler");
         return 0;
index 4d3ba38a731898e502f425e47a35ca949579c847..dc45cb41289b63bb59e69448688de548fbaf1f41 100644 (file)
@@ -736,10 +736,7 @@ _e_compositor_cb_new_surface(struct wl_listener *listener, void *data)
    if (!ec->netwm.pid)
      ec->netwm.pid = pid;
    if (ec->new_client)
-     {      
-        E_Comp *comp = e_comp_get();
-        if (comp) comp->new_clients--;
-     }
+     e_comp->new_clients--;
    ec->new_client = 0;
    if ((!ec->client.w) && (ec->client.h))
      ec->client.w = ec->client.h = 1;
@@ -844,10 +841,6 @@ static void
 _e_surface_destroy(E_Surface *surface)
 {
    struct wl_resource *cb;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   if (!comp_wl)
-     return;
 
    ELOGF("COMPOSITOR", "Desroy E_Surface %p", surface->ec, surface);
 
@@ -873,17 +866,17 @@ _e_surface_destroy(E_Surface *surface)
           }
      }
 
-   if (comp_wl->ptr.ec == surface->ec)
+   if (e_comp_wl->ptr.ec == surface->ec)
      {
-        comp_wl->ptr.ec = NULL;
-        E_FREE_FUNC(comp_wl->ptr.hide_tmr, ecore_timer_del);
+        e_comp_wl->ptr.ec = NULL;
+        E_FREE_FUNC(e_comp_wl->ptr.hide_tmr, ecore_timer_del);
      }
 
-   if (comp_wl->touch.faked_ec == surface->ec)
-     comp_wl->touch.faked_ec = NULL;
+   if (e_comp_wl->touch.faked_ec == surface->ec)
+     e_comp_wl->touch.faked_ec = NULL;
 
-   if (comp_wl->selection.cbhm == surface->base.surface)
-     comp_wl->selection.cbhm = NULL;
+   if (e_comp_wl->selection.cbhm == surface->base.surface)
+     e_comp_wl->selection.cbhm = NULL;
 
    e_comp_wl_data_secondary_remove(surface->ec);
 
@@ -1080,10 +1073,8 @@ _tiler_new_from_pixman_region(pixman_region32_t *pixman_region)
    pixman_box32_t *rects;
    int32_t x, y, w, h;
    int nrects, i;
-   int comp_w = 0, comp_h = 0;
 
-   e_comp_size_get(&comp_w, &comp_h);
-   tiler = eina_tiler_new(comp_w, comp_h);
+   tiler = eina_tiler_new(e_comp->w, e_comp->h);
    if (!tiler)
      return NULL;
 
@@ -1358,16 +1349,14 @@ _e_surface_commit_pre(E_Surface *surface)
         if (surface->base.shell.surface && surface->base.pending.new_attach &&
             !ec->internal && !e_comp_wl_subsurface_check(ec) && !ec->remote_surface.provider)
           {
-             E_Comp *comp;
              ELOGF("COMP", "Current unmapped. COMMIT. pixmap_usable:%d", ec, e_pixmap_usable_get(ec->pixmap));
 
              // no canvas update before client's commit request, begin rendering after 1st commit
              comp_conf = e_comp_config_get();
-             comp = e_comp_get();
-             if (comp_conf && comp_conf->canvas_render_delay_after_boot && comp && comp->canvas_render_delayed)
+             if (comp_conf && comp_conf->canvas_render_delay_after_boot && e_comp->canvas_render_delayed)
                {
                   ELOGF("COMP", "Begin canvas update for the first time after boot", ec);
-                  comp->canvas_render_delayed = EINA_FALSE;
+                  e_comp->canvas_render_delayed = EINA_FALSE;
                }
           }
      }
index bae761dda2247e254888ce6a57d0c311dd573850..1ea894a2f791b413dce19510434fc473300fd155 100644 (file)
@@ -124,14 +124,12 @@ e_devicemgr_wl_device_add(E_Devicemgr_Input_Device *dev)
    struct wl_array axes;
    E_Tizen_Devicemgr_Mgr_Data *mgr_data;
    E_Comp_Wl_Seat *seat_data;
-   E_Comp_Wl_Data *comp_wl;
 
    /* TODO: find the seat corresponding to event */
-   if (!(comp_wl = e_comp_wl_get())) return;
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_array_init(&axes);
 
-   EINA_LIST_FOREACH(comp_wl->seat.resources, l, seat_res)
+   EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, seat_res)
      {
         seat_data = wl_resource_get_user_data(seat_res);
         if (!seat_data) continue;
@@ -194,10 +192,8 @@ e_devicemgr_wl_device_del(E_Devicemgr_Input_Device *dev)
    struct wl_resource *res;
    uint32_t serial;
    E_Tizen_Devicemgr_User_Data *device_user_data;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    EINA_LIST_FREE(dev->resources, res)
      {
@@ -275,11 +271,8 @@ e_devicemgr_wl_touch_max_count_send(int slot, struct wl_resource *res, struct wl
    uint32_t serial;
    struct wl_client *wc;
    E_Tizen_Devicemgr_Mgr_Data *mgr_data;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    if (res && seat_res)
      {
@@ -288,7 +281,7 @@ e_devicemgr_wl_touch_max_count_send(int slot, struct wl_resource *res, struct wl
      }
    else
      {
-        EINA_LIST_FOREACH(comp_wl->seat.resources, l, seat_resource)
+        EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, seat_resource)
           {
              wc = wl_resource_get_client(seat_resource);
 
@@ -316,14 +309,12 @@ void
 e_devicemgr_wl_event_boundary_send(struct wl_resource *resource, unsigned int boundary)
 {
    uint32_t serial;
-   E_Comp_Wl_Data *comp_wl;
 
    if(!resource) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    DMINF("Relative Move. Event Boundary: %d", boundary);
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    tizen_input_device_manager_send_event_boundary(resource, serial, boundary);
 }
 
@@ -669,6 +660,8 @@ _e_devicemgr_wl_cb_unbind(struct wl_resource *resource)
    E_Tizen_Devicemgr_Mgr_Data *mgr_data;
    E_Tizen_Devicemgr_User_Data *device_user_data;
 
+   if(!e_comp_wl) return;
+
    mgr_data = wl_resource_get_user_data(resource);
    if (!mgr_data) return;
 
@@ -694,13 +687,7 @@ _e_devicemgr_wl_cb_bind(struct wl_client *client, void *data, uint32_t version,
    struct wl_array axes;
    E_Tizen_Devicemgr_User_Data *device_user_data;
    E_Tizen_Devicemgr_Mgr_Data *mgr_data, *tmp_data;
-   E_Comp_Wl_Data *comp_wl;
 
-   if (!(comp_wl = e_comp_wl_get()))
-     {
-        DMERR("Failed to get e_comp_wl_data\n");
-        return;
-     }
    mgr_data = E_NEW(E_Tizen_Devicemgr_Mgr_Data, 1);
    if (!mgr_data)
      {
@@ -737,12 +724,12 @@ _e_devicemgr_wl_cb_bind(struct wl_client *client, void *data, uint32_t version,
    wl_resource_set_implementation(res, &_e_devicemgr_wl_implementation, mgr_data,
                                   _e_devicemgr_wl_cb_unbind);
 
-   EINA_LIST_FOREACH(comp_wl->seat.resources, l, seat_res)
+   EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, seat_res)
      {
         if (wl_resource_get_client(seat_res) != client) continue;
 
         wl_array_init(&axes);
-        serial = wl_display_next_serial(comp_wl->wl.disp);
+        serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
         if (e_devicemgr->max_touch_count > 0)
           {
index fe7c2c97aeff10c60c75944a2ed15c6a12927768..347aa975571eebc4528b34acc18b3ac78b854e4c 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_dpms_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_output_intern.h"
 #include "e_dbus_conn_intern.h"
 
@@ -442,7 +441,6 @@ e_dpms_init(void)
 {
    dbus_init_done_handler = NULL;
    dpms_binded = EINA_FALSE;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    if (e_dbus_conn_init() > 0)
      {
@@ -450,14 +448,14 @@ e_dpms_init(void)
         e_dbus_conn_dbus_init(edbus_conn_type);
      }
 
-   if (!comp_wl || !comp_wl->wl.disp)
+   if (!e_comp_wl || !e_comp_wl->wl.disp)
      {
-        ERR("no comp_wl resource. cannot create dpms interface");
+        ERR("no e_comp_wl resource. cannot create dpms interface");
         return 1;
      }
 
    /* try to add dpms_manager to wayland globals */
-   dpms_global = wl_global_create(comp_wl->wl.disp,
+   dpms_global = wl_global_create(e_comp_wl->wl.disp,
                                   &tizen_dpms_manager_interface, 1, NULL,
                                   _e_dpms_cb_bind);
    if (!dpms_global)
index f823e03d2fbba6bd51ab1f653a5a2f1d07bd5b11..8cb9097b5ef9667303ba42b4905877930801fc2c 100644 (file)
@@ -2,7 +2,6 @@
 #include "e_client_intern.h"
 #include "e_xdg_shell_v6_intern.h"
 #include "e_comp_screen_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
 #include "e_output_intern.h"
 #include "e_display_intern.h"
@@ -483,14 +482,12 @@ _e_eom_cb_client_buffer_change(void *data, int type, void *event)
    E_Client *ec = NULL;
    E_Comp_Wl_Buffer *wl_buffer = NULL;
    tbm_surface_h tbm_buffer = NULL;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
    Eina_List *l;
    E_Output_Display_Mode display_mode, display_mode_prev;
    int width, height;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(ev, ECORE_CALLBACK_PASS_ON);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ev->ec, ECORE_CALLBACK_PASS_ON);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, ECORE_CALLBACK_PASS_ON);
 
    ec = ev->ec;
    EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), ECORE_CALLBACK_PASS_ON);
@@ -510,7 +507,7 @@ _e_eom_cb_client_buffer_change(void *data, int type, void *event)
    EINA_SAFETY_ON_NULL_RETURN_VAL(wl_buffer->resource, ECORE_CALLBACK_PASS_ON);
 
    /* TODO: support different SHMEM buffers etc. */
-   tbm_buffer = wayland_tbm_server_get_surface(comp_wl->tbm.server, wl_buffer->resource);
+   tbm_buffer = wayland_tbm_server_get_surface(e_comp->wl_comp_data->tbm.server, wl_buffer->resource);
    EINA_SAFETY_ON_NULL_RETURN_VAL(tbm_buffer, ECORE_CALLBACK_PASS_ON);
 
    width = tbm_surface_get_width(tbm_buffer);
@@ -1113,19 +1110,17 @@ err:
 EINTERN Eina_Bool
 e_eom_init(void)
 {
-   E_Comp_Screen *comp_screen;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
+   E_Comp_Screen *e_comp_screen;
+   EINA_SAFETY_ON_NULL_GOTO(e_comp_wl, err);
 
-   EINA_SAFETY_ON_NULL_GOTO(comp_wl, err);
-
-   comp_screen = e_comp_screen_get();
-   if (!comp_screen || comp_screen->num_outputs < 1)
+   e_comp_screen = e_comp_screen_get();
+   if (!e_comp || e_comp_screen->num_outputs < 1)
      return EINA_FALSE;
 
    g_eom = E_NEW(E_Eom, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(g_eom, EINA_FALSE);
 
-   g_eom->global = wl_global_create(comp_wl->wl.disp, &wl_eom_interface, 1, g_eom, _e_eom_cb_wl_bind);
+   g_eom->global = wl_global_create(e_comp_wl->wl.disp, &wl_eom_interface, 1, g_eom, _e_eom_cb_wl_bind);
    EINA_SAFETY_ON_NULL_GOTO(g_eom->global, err);
 
    if (!_e_eom_output_init())
index c6349c8a84bec05e6fe3dfb246a8ca98aec0b3b2..6965a20167908ab2bc60227e97cfdde8ab2bb38a 100644 (file)
@@ -1,7 +1,6 @@
 #include "e_explicit_sync_intern.h"
 #include "e_comp_screen_intern.h"
 #include "e_comp_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_egl_sync_intern.h"
 #include "e_client_intern.h"
 #include "e_display_intern.h"
@@ -477,11 +476,10 @@ e_explicit_sync_init(void)
    E_Output *output;
    Eina_Bool ret = EINA_FALSE;
    Eina_List *l;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->wl.disp, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_get(), 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);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen_get(), EINA_FALSE);
 
    if (_explicit_sync) return EINA_TRUE;
@@ -503,7 +501,7 @@ e_explicit_sync_init(void)
    explicit_sync = E_NEW(E_Explicit_Sync, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(explicit_sync, EINA_FALSE);
 
-   explicit_sync->global = wl_global_create(comp_wl->wl.disp,
+   explicit_sync->global = wl_global_create(e_comp_wl->wl.disp,
                                            &zwp_linux_explicit_synchronization_v1_interface,
                                            2,
                                            explicit_sync,
index 47536617302eade037302aa2691bb840869b6663..49067b6efa07711bf0cabea0bc046dac1e7a6b01 100644 (file)
@@ -1,6 +1,5 @@
 #include "e_foreign_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_comp_wl_subsurface_intern.h"
 #include "e_pixmap_intern.h"
 #include "e_view_intern.h"
@@ -739,9 +738,6 @@ static void
 _e_foreign_shell_cb_surface_commit(struct wl_listener *listener, void *data EINA_UNUSED)
 {
    E_Foreign_Shell *fs;
-   E_Comp *comp;
-
-   if (!(comp = e_comp_get())) return;
 
    fs = wl_container_of(listener, fs, surface_commit_listener);
 
@@ -751,7 +747,7 @@ _e_foreign_shell_cb_surface_commit(struct wl_listener *listener, void *data EINA
      {
         EC_CHANGED(fs->ec);
         fs->ec->new_client = 1;
-        comp->new_clients++;
+        e_comp->new_clients++;
         e_client_unignore(fs->ec);
      }
 
index ff4a7b3f7e2abb4e89c8938c29a243bdeb59a19e..c7097e5914becc8e759d4596c38bb2eedd18236a 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_input_backend_intern.h"
 #include "e_comp_wl_input_intern.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_client_intern.h"
 #include "e_config_intern.h"
 #include "e_comp_input_intern.h"
@@ -66,13 +65,10 @@ _e_keyrouter_wl_key_send(Ecore_Event_Key *ev, E_Device *dev, enum wl_keyboard_ke
    uint32_t serial, keycode;
    struct wl_client *wc;
    E_Comp_Config *comp_conf = NULL;
-   E_Comp_Wl_Data *comp_wl;
-
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    keycode = (ev->keycode - 8);
 
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    comp_conf = e_comp_config_get();
 
@@ -121,18 +117,21 @@ _e_keyrouter_wl_key_send(Ecore_Event_Key *ev, E_Device *dev, enum wl_keyboard_ke
 Eina_Bool
 e_keyrouter_wl_key_send(Ecore_Event_Key *ev, E_Device *dev, Eina_Bool pressed, struct wl_client *client, struct wl_resource *surface, Eina_Bool focused)
 {
-   E_Comp *comp;
    E_Client *ec = NULL;
    struct wl_client *wc = NULL;
    uint32_t keycode;
    enum wl_keyboard_key_state state;
 
-   if (ev->window != e_comp_ee_win_get())
+   if (ev->window != e_comp->ee_win)
      {
         return EINA_FALSE;
      }
 
    keycode = (ev->keycode - 8);
+   if (!(e_comp_wl = e_comp->wl_comp_data))
+     {
+        return EINA_FALSE;
+     }
 
 #ifndef E_RELEASE_BUILD
    if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
@@ -153,8 +152,7 @@ e_keyrouter_wl_key_send(Ecore_Event_Key *ev, E_Device *dev, Eina_Bool pressed, s
         return EINA_FALSE;
      }
 
-   comp = e_comp_get();
-   if ((!e_client_action_get()) && (comp && !comp->input_key_grabs))
+   if ((!e_client_action_get()) && (!e_comp->input_key_grabs))
      {
         ec = e_client_focused_get();
 
index 539ca90f463e9235c43a97dc5447d340ba0c027f..5c57e17415cb019db2b37a40a204cad8e0deead6 100644 (file)
@@ -288,6 +288,7 @@ e_linux_dmabuf_tbm_surface_get_from_buffer(struct ds_buffer *ds_buffer)
    E_Comp_Screen *e_comp_screen = e_comp_screen_get();
    int i = 0;
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
    EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->bufmgr, NULL);
 
index 9ebec8bfd6c449ed6ebeb961f3adbb8ef96901a9..528ec6f0fbaa63f202342db08c0de01f9cb81cc3 100644 (file)
@@ -1072,13 +1072,11 @@ static Eina_Bool
 _e_policy_wl_e_client_is_valid(E_Client *ec)
 {
    E_Client *ec2;
-   Eina_List *l, *comp_ec_list;
+   Eina_List *l;
    Eina_Bool del = EINA_FALSE;
    Eina_Bool found = EINA_FALSE;
 
-   if (!(comp_ec_list = e_comp_ec_list_get())) return EINA_FALSE;
-
-   EINA_LIST_FOREACH(comp_ec_list, l, ec2)
+   EINA_LIST_FOREACH(e_comp->clients, l, ec2)
      {
         if (ec2 == ec)
           {
@@ -1096,11 +1094,9 @@ static Eina_List *
 _e_policy_wl_e_clients_find_by_pid(pid_t pid)
 {
    E_Client *ec;
-   Eina_List *clients = NULL, *l, *comp_ec_list;
+   Eina_List *clients = NULL, *l;
 
-   if (!(comp_ec_list = e_comp_ec_list_get())) NULL;
-
-   EINA_LIST_FOREACH(comp_ec_list, l, ec)
+   EINA_LIST_FOREACH(e_comp->clients, l, ec)
      {
         if (e_object_is_del(E_OBJECT(ec))) continue;
         if (ec->netwm.pid != pid) continue;
@@ -1899,11 +1895,9 @@ _tzpol_iface_cb_role_set(struct wl_client *client EINA_UNUSED, struct wl_resourc
      }
    else if (!e_util_strcmp("cbhm", role))
      {
-        E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
         cdata = e_client_cdata_get(ec);
         if (!cdata) return;
-        if (comp_wl)
-          comp_wl->selection.cbhm = cdata->surface;
+        e_comp_wl->selection.cbhm = cdata->surface;
      }
    else if (!e_util_strcmp("wl_pointer-cursor", role))
      {
@@ -4631,12 +4625,10 @@ static void
 _tzsh_srv_kvm_cb_perform_drop(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Policy_Wl_Tzsh_Srv *tzsh_srv;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    E_Client *ec;
 
-   if(!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag) return;
+   if (!e_comp_wl->drag) return;
 
    tzsh_srv = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_srv);
@@ -4654,12 +4646,10 @@ static void
 _tzsh_srv_kvm_cb_cancel_drag(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Policy_Wl_Tzsh_Srv *tzsh_srv;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    E_Client *ec;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag) return;
+   if (!e_comp_wl->drag) return;
 
    tzsh_srv = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_srv);
@@ -4677,12 +4667,10 @@ static void
 _tzsh_srv_kvm_cb_perform_drag_enter(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Policy_Wl_Tzsh_Srv *tzsh_srv;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    E_Client *ec;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag) return;
+   if (!e_comp_wl->drag) return;
 
    tzsh_srv = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_srv);
@@ -4700,12 +4688,10 @@ static void
 _tzsh_srv_kvm_cb_perform_drag_leave(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Policy_Wl_Tzsh_Srv *tzsh_srv;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    E_Client *ec;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag) return;
+   if (!e_comp_wl->drag) return;
 
    tzsh_srv = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_srv);
@@ -4723,12 +4709,10 @@ static void
 _tzsh_srv_kvm_cb_secondary_selection_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Policy_Wl_Tzsh_Srv *tzsh_srv;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    E_Client *ec;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag) return;
+   if (!e_comp_wl->drag) return;
 
    tzsh_srv = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_srv);
@@ -4746,12 +4730,10 @@ static void
 _tzsh_srv_kvm_cb_secondary_selection_unset(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
 {
    E_Policy_Wl_Tzsh_Srv *tzsh_srv;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    E_Client *ec;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag) return;
+   if (!e_comp_wl->drag) return;
 
    tzsh_srv = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_srv);
@@ -4769,12 +4751,10 @@ static void
 _tzsh_srv_kvm_cb_perform_drop_target(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t drop_target)
 {
    E_Policy_Wl_Tzsh_Srv *tzsh_srv;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    E_Client *ec;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag) return;
+   if (!e_comp_wl->drag) return;
 
    tzsh_srv = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_srv);
@@ -5303,7 +5283,7 @@ _e_tzsh_indicator_find_topvisible_client(E_Zone *zone)
    Evas_Object *o;
    int ex, ey, ew, eh;
 
-   o = evas_object_top_get(e_comp_evas_get());
+   o = evas_object_top_get(e_comp->evas);
    for (; o; o = evas_object_below_get(o))
      {
         ec = evas_object_data_get(o, "E_Client");
@@ -5319,7 +5299,7 @@ _e_tzsh_indicator_find_topvisible_client(E_Zone *zone)
         if (ec->visibility.skip) continue;
         if ((e_client_visibility_get(ec) != E_VISIBILITY_UNOBSCURED) &&
             (e_client_visibility_get(ec) != E_VISIBILITY_PARTIALLY_OBSCURED) &&
-            (!eina_list_data_find(e_comp_launchscrn_list_get(), ec)))
+            (!eina_list_data_find(e_comp->launchscrns, ec)))
           continue;
 
         if (e_comp_wl_subsurface_check(ec)) continue;
@@ -6817,7 +6797,7 @@ _launch_splash_off(E_Policy_Wl_Tzlaunch_Splash *tzlaunch_splash)
              ec->ignored = EINA_TRUE;
           }
 
-        e_comp_launchscrn_ec_remove(ec);
+        e_comp->launchscrns = eina_list_remove(e_comp->launchscrns, ec);
 
         e_pixmap_win_id_del(tzlaunch_splash->ep);
         e_object_del(E_OBJECT(ec));
@@ -6851,7 +6831,7 @@ _launch_splash_off(E_Policy_Wl_Tzlaunch_Splash *tzlaunch_splash)
                }
           }
 
-        e_comp_launchscrn_ec_remove(ec);
+        e_comp->launchscrns = eina_list_remove(e_comp->launchscrns, ec);
      }
 
    if (obj)
@@ -6922,13 +6902,12 @@ _launchscreen_splash_setup(E_Policy_Wl_Tzlaunch_Splash *splash,
      }
    else //Do original setup process
      {
-        int comp_w = 0, comp_h = 0;
         if (splash->type == LAUNCH_IMG_FILE_TYPE_IMAGE)
           {
              Evas_Load_Error err;
 
              content_type = E_COMP_OBJECT_CONTENT_TYPE_EXT_IMAGE;
-             splash->obj = evas_object_image_add(e_comp_evas_get());
+             splash->obj = evas_object_image_add(e_comp->evas);
              EINA_SAFETY_ON_NULL_RETURN_VAL(splash->obj, EINA_FALSE);
 
              evas_object_image_file_set(splash->obj, splash->path, NULL);
@@ -6944,14 +6923,13 @@ _launchscreen_splash_setup(E_Policy_Wl_Tzlaunch_Splash *splash,
                   return EINA_FALSE;
                }
 
-             e_comp_size_get(&comp_w, &comp_h);
-             evas_object_image_fill_set(splash->obj, 0, 0, comp_w, comp_h);
+             evas_object_image_fill_set(splash->obj, 0, 0, e_comp->w, e_comp->h);
              evas_object_image_filled_set(splash->obj, EINA_TRUE);
           }
         else
           {
              content_type = E_COMP_OBJECT_CONTENT_TYPE_EXT_EDJE;
-             splash->obj = edje_object_add(e_comp_evas_get());
+             splash->obj = edje_object_add(e_comp->evas);
              EINA_SAFETY_ON_NULL_RETURN_VAL(splash->obj, EINA_FALSE);
 
              if (!edje_object_file_set(splash->obj, splash->path, SPLASH_GROUP_NAME))
@@ -6968,9 +6946,8 @@ _launchscreen_splash_setup(E_Policy_Wl_Tzlaunch_Splash *splash,
 
                }
 
-             e_comp_size_get(&comp_w, &comp_h);
              evas_object_move(splash->obj, 0, 0);
-             evas_object_resize(splash->obj, comp_w, comp_h);
+             evas_object_resize(splash->obj, e_comp->w, e_comp->h);
           }
 
         if (depth == 32) ec->argb = EINA_TRUE;
@@ -7090,16 +7067,12 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
    E_Client *pre_ec = NULL, *new_ec = NULL, *old_ec;
    Eina_List *clients, *l;
    int tw, th;
-   int comp_w = 0, comp_h = 0;
-   E_Comp *comp = e_comp_get();
 
    tzlaunch_splash = wl_resource_get_user_data(res_tzlaunch_splash);
    EINA_SAFETY_ON_NULL_RETURN(tzlaunch_splash);
    EINA_SAFETY_ON_FALSE_RETURN(tzlaunch_splash->valid);
-   EINA_SAFETY_ON_NULL_RETURN(comp);
 
    /* use ec was already created */
-   e_comp_size_get(&comp_w, &comp_h);
    clients = _e_policy_wl_e_clients_find_by_pid(pid);
    EINA_LIST_FOREACH(clients, l, pre_ec)
      {
@@ -7109,7 +7082,7 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
         new_ec = pre_ec;
         e_client_geometry_get(new_ec, NULL, NULL, &tw, &th);
         if (tw <= 1 || th <= 1)
-          e_view_client_size_set(e_client_view_get(new_ec), comp_w, comp_h);
+          e_view_client_size_set(e_client_view_get(new_ec), e_comp->w, e_comp->h);
         break;
      }
    eina_list_free(clients);
@@ -7124,7 +7097,7 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
              e_client_unignore(new_ec);
              new_ec->visible = EINA_TRUE;
              if (new_ec->new_client)
-               comp->new_clients--;
+               e_comp->new_clients--;
              new_ec->new_client = EINA_FALSE;
              new_ec->argb = old_ec->argb;
              ELOGF("COMP", "Set argb:%d", new_ec, new_ec->argb);
@@ -7132,7 +7105,7 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
              new_ec->use_splash = EINA_TRUE;
              e_client_icccm_title_set(new_ec, "launchscreen");
 
-             e_comp_launchscrn_ec_add(new_ec);
+             e_comp->launchscrns = eina_list_append(e_comp->launchscrns, new_ec);
 
              if (tzlaunch_splash->custom_effect_callee)
                {
@@ -7159,7 +7132,7 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
                }
 
              /* delete ec was created for launchscreen */
-             e_comp_launchscrn_ec_remove(old_ec);
+             e_comp->launchscrns = eina_list_remove(e_comp->launchscrns, old_ec);
 
              e_pixmap_win_id_del(tzlaunch_splash->ep);
              e_object_del(E_OBJECT(old_ec));
@@ -7173,7 +7146,7 @@ _tzlaunch_splash_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_
         old_ec->ignored = EINA_FALSE;
         old_ec->visible = EINA_TRUE;
         if (old_ec->new_client)
-          comp->new_clients--;
+          e_comp->new_clients--;
         old_ec->new_client = EINA_FALSE;
         old_ec->icccm.accepts_focus = EINA_TRUE;
 
@@ -7278,7 +7251,7 @@ _tzlaunch_splash_add(struct wl_resource *res_tzlaunch_effect, struct wl_resource
    e_client_icccm_name_set(tzlaunch_splash->ec, "Launchscreen");
    tzlaunch_splash->ec->ignored = EINA_TRUE;
 
-   e_comp_launchscrn_ec_add(tzlaunch_splash->ec);
+   e_comp->launchscrns = eina_list_append(e_comp->launchscrns, tzlaunch_splash->ec);
 
    return tzlaunch_splash;
 error:
@@ -8765,14 +8738,11 @@ EINTERN Eina_Bool
 e_policy_wl_defer_job(void)
 {
    struct wl_global *global = NULL;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-
-   EINA_SAFETY_ON_NULL_GOTO(comp_wl, err);
    EINA_SAFETY_ON_NULL_GOTO(polwl, err);
 
    if (!e_config->global_object_not_provide.launch_effect)
      {
-        global = wl_global_create(comp_wl->wl.disp,
+        global = wl_global_create(e_comp_wl->wl.disp,
                                   &tizen_launch_effect_interface,
                                   1,
                                   NULL,
@@ -8782,7 +8752,7 @@ e_policy_wl_defer_job(void)
         polwl->globals = eina_list_append(polwl->globals, global);
      }
 
-   global = wl_global_create(comp_wl->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_launch_appinfo_interface,
                              2,
                              NULL,
@@ -8801,16 +8771,15 @@ EINTERN Eina_Bool
 e_policy_wl_init(void)
 {
    struct wl_global *global;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->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(E_Policy_Wl, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(polwl, EINA_FALSE);
 
    /* create globals */
-   global = wl_global_create(comp_wl->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_policy_interface,
                              13,
                              NULL,
@@ -8818,7 +8787,7 @@ e_policy_wl_init(void)
    EINA_SAFETY_ON_NULL_GOTO(global, err);
    polwl->globals = eina_list_append(polwl->globals, global);
 
-   global = wl_global_create(comp_wl->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_display_policy_interface,
                              1,
                              NULL,
@@ -8826,7 +8795,7 @@ e_policy_wl_init(void)
    EINA_SAFETY_ON_NULL_GOTO(global, err);
    polwl->globals = eina_list_append(polwl->globals, global);
 
-   global = wl_global_create(comp_wl->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_ws_shell_interface,
                              4,
                              NULL,
@@ -8835,7 +8804,7 @@ e_policy_wl_init(void)
    EINA_SAFETY_ON_NULL_GOTO(global, err);
    polwl->globals = eina_list_append(polwl->globals, global);
 
-   global = wl_global_create(comp_wl->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_indicator_interface,
                              1,
                              NULL,
@@ -8843,7 +8812,7 @@ e_policy_wl_init(void)
    EINA_SAFETY_ON_NULL_GOTO(global, err);
    polwl->globals = eina_list_append(polwl->globals, global);
 
-   global = wl_global_create(comp_wl->wl.disp,
+   global = wl_global_create(e_comp_wl->wl.disp,
                              &tizen_clipboard_interface,
                              2,
                              NULL,
index 95c691aa4b25e7d442d1f597763cd6d80ed0b9eb..d51aabd2f966817961a254bd179a95e71fee2152 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_presentation_time_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_client_intern.h"
 #include "e_utils_intern.h"
 
@@ -241,17 +240,16 @@ EINTERN Eina_Bool
 e_presentation_time_init(void)
 {
    E_Presentation_Time *presentation;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->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 (_presentation) return EINA_TRUE;
 
    presentation = E_NEW(E_Presentation_Time, 1);
    EINA_SAFETY_ON_NULL_GOTO(presentation, fail);
 
-   presentation->global = wl_global_create(comp_wl->wl.disp,
+   presentation->global = wl_global_create(e_comp_wl->wl.disp,
                                            &wp_presentation_interface,
                                            1,
                                            NULL,
@@ -299,19 +297,18 @@ _e_presentation_time_feedback_discard(E_Presentation_Time_Feedback *feedback)
 static struct wl_resource *
 _presentation_feedback_output_find(E_Presentation_Time_Feedback *feedback, const char *id)
 {
-   E_Comp_Wl_Data *comp_wl;
    E_Comp_Wl_Output *wl_output;
    struct wl_resource *wl_output_resource;
    Eina_Bool found = EINA_FALSE;
    struct wl_client *wl_client;
    Eina_List *l;
 
-   if (!(comp_wl = e_comp_wl_get())) return NULL;
+   if (!e_comp_wl) return NULL;
 
    wl_client = wl_resource_get_client(feedback->resource);
    if (!wl_client) return NULL;
 
-   EINA_LIST_FOREACH(comp_wl->outputs, l, wl_output)
+   EINA_LIST_FOREACH(e_comp_wl->outputs, l, wl_output)
      {
         if(!e_util_strcmp(wl_output->id, id))
           {
index f2fdb71a9dd336c79b8caebeb5d0d4870461bbf8..5bdf2a0703edc6dabdc4ec17abeac258e4dcf4bb 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_screen_rotation_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_client_intern.h"
 
 #include <libds-tizen/screen_rotation.h>
@@ -124,14 +123,10 @@ _tz_screen_rotation_cb_get_ignore_output_transform(struct wl_listener *listener,
 EINTERN Eina_Bool
 e_screen_rotation_init()
 {
-   E_Comp_Wl_Data *comp_wl;
-
    if (g_screen_rotation)
       return EINA_TRUE;
 
-   if (!(comp_wl = e_comp_wl_get())) return EINA_FALSE;
-
-   g_screen_rotation = ds_tizen_screen_rotation_create(comp_wl->wl.disp);
+   g_screen_rotation = ds_tizen_screen_rotation_create(e_comp_wl->wl.disp);
    if (!g_screen_rotation)
      {
         ERR("Could not add tizen_screen_rotation to wayland globals");
index 6b0f9b2f66485e28cac3184c9534654ba7a5922a..040ad56f098ebe571bd8301687bd82ecaf73ec5f 100644 (file)
@@ -70,13 +70,12 @@ static E_Server *g_server = NULL; // singleton server
 EINTERN Eina_Bool
 e_server_init(void)
 {
-   E_Comp_Wl_Data *comp_wl;
    if (g_server) return EINA_TRUE;
 
    g_server = E_NEW(E_Server, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(g_server, EINA_FALSE);
 
-   if (!(comp_wl = e_comp_wl_init()))
+   if (!e_comp_wl_init())
      {
         E_FREE(g_server);
         return EINA_FALSE;
@@ -88,7 +87,7 @@ e_server_init(void)
      e_server_feature_register(E_SERVER_FEATURE_INPUT, &dummy_handle);
    if (e_comp_wl_shell_init())
      e_server_feature_register(E_SERVER_FEATURE_SHELL, &dummy_handle);
-   if (e_wtz_shell_init(comp_wl->wl.disp))
+   if (e_wtz_shell_init())
      e_server_feature_register(E_SERVER_FEATURE_WTZ_SHELL, &dummy_handle);
    if (e_comp_wl_tbm_init())
      e_server_feature_register(E_SERVER_FEATURE_WL_TBM, &dummy_handle);
@@ -112,27 +111,27 @@ e_server_init(void)
      e_server_feature_register(E_SERVER_FEATURE_TIZEN_BLENDER, &dummy_handle);
    if (e_blur_manager_init())
      e_server_feature_register(E_SERVER_FEATURE_TIZEN_BLUR_MANAGER, &dummy_handle);
-   if (e_foreign_global_init(comp_wl->wl.disp))
+   if (e_foreign_global_init(e_comp_wl->wl.disp))
      e_server_feature_register(E_SERVER_FEATURE_TIZEN_FOREIGN, &dummy_handle);
    if (e_egl_sync_init())
      e_server_feature_register(E_SERVER_FEATURE_EGL_SYNC, &dummy_handle);
    if (e_explicit_sync_init())
      e_server_feature_register(E_SERVER_FEATURE_EXPLICIT_SYNC, &dummy_handle);
-   if (e_video_shell_create(comp_wl->wl.disp))
+   if (e_video_shell_create(e_comp_wl->wl.disp))
      e_server_feature_register(E_SERVER_FEATURE_TIZEN_VIDEO_SHELL, &dummy_handle);
 
    e_server_feature_register(E_SERVER_FEATURE_TIZEN_SRCREEN_MANAGER, e_tizen_screen_manager_init());
 
-   if (e_linux_dmabuf_init(comp_wl->wl.disp))
+   if (e_linux_dmabuf_init(e_comp_wl->wl.disp))
      e_server_feature_register(E_SERVER_FEATURE_LINUX_DMABUF, &dummy_handle);
    if (e_screen_rotation_init())
      e_server_feature_register(E_SERVER_FEATURE_TIZEN_SCREEN_ROTATION, &dummy_handle);
    if (e_comp_wl_tizen_hwc_init())
      e_server_feature_register(E_SERVER_FEATURE_TIZEN_HWC, &dummy_handle);
 
-   e_server_feature_register(E_SERVER_FEATURE_TIZEN_SURFACE_SHM, e_tizen_surface_shm_init(comp_wl->wl.disp));
-   e_server_feature_register(E_SERVER_FEATURE_TIZEN_DEVICEMGR, e_devicemgr_wl_init(comp_wl->wl.disp));
-   e_server_feature_register(E_SERVER_FEATURE_TIZEN_KEYROUTER, e_keyrouter_wl_init(comp_wl->wl.disp));
+   e_server_feature_register(E_SERVER_FEATURE_TIZEN_SURFACE_SHM, e_tizen_surface_shm_init(e_comp_wl->wl.disp));
+   e_server_feature_register(E_SERVER_FEATURE_TIZEN_DEVICEMGR, e_devicemgr_wl_init(e_comp_wl->wl.disp));
+   e_server_feature_register(E_SERVER_FEATURE_TIZEN_KEYROUTER, e_keyrouter_wl_init(e_comp_wl->wl.disp));
 
    return EINA_TRUE;
 }
index aaa8cc8608de86eb6e5279d6224658507535e262..7db33b986e8d0bd20017c3f0c1047a3ab0f2e588 100644 (file)
@@ -1,7 +1,6 @@
 #include "e_tbm_gbm_server_intern.h"
 #include "e_display_intern.h"
 #include "e_comp_wl_tbm_intern.h"
-#include "e_comp_wl_intern.h"
 
 #include <assert.h>
 #include <stdbool.h>
@@ -94,9 +93,7 @@ e_tbm_gbm_server_tbm_surface_get_from_buffer(struct ds_buffer *ds_buffer)
 static void
 _e_comp_tbm_server_set(struct wayland_tbm_server *wl_tbm_server)
 {
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-   if (comp_wl)
-     comp_wl->tbm.server = (void *)wl_tbm_server;
+   e_comp->wl_comp_data->tbm.server = (void *)wl_tbm_server;
 }
 
 static void
index ce38a0642e796b8c98bbe38a172d022965e650e6..642963e777d9d98ae7f6823f4feeea4007b2a102 100644 (file)
@@ -175,7 +175,7 @@ e_tizen_screen_create(E_Zone *zone)
    tizen_screen->zone_destroy.notify = _e_tizen_screen_cb_zone_destroy;
    e_zone_destroy_listener_add(zone, &tizen_screen->zone_destroy);
 
-   tizen_screen->tizen_screen = ds_tizen_screen_create(e_comp_wl_display_get());
+   tizen_screen->tizen_screen = ds_tizen_screen_create(e_comp_wl->wl.disp);
    EINA_SAFETY_ON_NULL_RETURN_VAL(tizen_screen->tizen_screen, NULL);
 
    tizen_screen->ds_screen_destroy.notify = _e_tizen_screen_cb_ds_screen_destroy;
index 7f8acd521f23b34245dd7f4236a52a879a619058..e9c62973b1409541bd3f8fe03bdfcb722b27dcbd 100644 (file)
@@ -130,7 +130,7 @@ e_tizen_surface_shm_init(struct wl_display *display)
    g_tizen_surface_shm = E_NEW(E_Tizen_Surface_Shm, 1);
    EINA_SAFETY_ON_NULL_RETURN_VAL(g_tizen_surface_shm, NULL);
 
-   g_tizen_surface_shm->global = wl_global_create(display, &tizen_surface_shm_interface,
+   g_tizen_surface_shm->global = wl_global_create(e_comp_wl->wl.disp, &tizen_surface_shm_interface,
                              2, g_tizen_surface_shm, _e_tizen_surface_shm_cb_bind);
    if (!g_tizen_surface_shm->global)
      {
index f5702433f10581ef45e61224b63b7a07a86d45d9..76cf79765ad85790711d6ad954db3debdd48f8ae 100644 (file)
@@ -2,7 +2,6 @@
 #include "e_log.h"
 #include "e_comp_wl.h"
 #include "e_comp_wl_intern.h"
-#include "e_comp_intern.h"
 #include "e_client_intern.h"
 #include "e_compositor_intern.h"
 #include "e_comp_wl_shell_intern.h"
@@ -874,11 +873,7 @@ _source_pixmap_update(E_Video_Viewport_Source *source)
 static void
 _source_map(E_Video_Viewport_Source *source)
 {
-   E_Comp *comp;
-   E_Client *ec;
-
-   if (!(comp = e_comp_get())) return;
-   if (!(ec = e_surface_ec_get(source->surface->surface))) return;
+   E_Client *ec = e_surface_ec_get(source->surface->surface);
 
    if (e_surface_is_mapped(source->surface->surface))
      return;
@@ -889,7 +884,7 @@ _source_map(E_Video_Viewport_Source *source)
      {
         EC_CHANGED(ec);
         ec->new_client = 1;
-        comp->new_clients++;
+        e_comp->new_clients++;
         e_client_unignore(ec);
      }
 
index 8d49212392232397f0192ecd1b2a7cc92bf27edc..2c01b1c37944a23db996d157ce27841888954575 100644 (file)
@@ -267,10 +267,10 @@ err_res:
 /* End of Wtz_shell */
 
 EINTERN Eina_Bool
-e_wtz_shell_init(struct wl_display *display)
+e_wtz_shell_init(void)
 {
-   global_resource = wl_global_create(display, &wtz_shell_interface,
-                1, NULL, _e_wtz_shell_cb_bind);
+   global_resource = wl_global_create(e_comp_wl->wl.disp, &wtz_shell_interface,
+                1, e_comp->wl_comp_data, _e_wtz_shell_cb_bind);
    EINA_SAFETY_ON_NULL_RETURN_VAL(global_resource, EINA_FALSE);
 
    return EINA_TRUE;
index 9428afb6b30ddc5bb92ef7acf244ffabfb25a513..5bb0aea13ac912a068cecbeb29b673013140885a 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "e_intern.h"
 
-EINTERN Eina_Bool e_wtz_shell_init(struct wl_display *display);
+EINTERN Eina_Bool e_wtz_shell_init(void);
 EINTERN void      e_wtz_shell_shutdown(void);
 
 #endif
index 027815db33e1e1ff0615db79103262f4b290e89d..1af3e010371ea3c51d8e0841fe3f95ed9c80123f 100644 (file)
@@ -54,7 +54,7 @@ static void _e_xdg_toplevel_v6_cb_xdg_surface_destroy(struct wl_listener *listen
 static E_Xdg_Toplevel_V6 *_e_xdg_toplevel_v6_from_shell_surface_resource(struct wl_resource *shsurface_resource);
 
 EINTERN Eina_Bool
-e_xdg_shell_v6_init(struct wl_display *display)
+e_xdg_shell_v6_init(void)
 {
    static E_Xdg_Shell_V6 shell = { .ds_xdg_shell = NULL };
 
@@ -67,7 +67,7 @@ e_xdg_shell_v6_init(struct wl_display *display)
      }
 
 
-   shell.ds_xdg_shell = ds_xdg_shell_v6_create(display);
+   shell.ds_xdg_shell = ds_xdg_shell_v6_create(e_comp_wl->wl.disp);
    if (!shell.ds_xdg_shell)
      {
         ERR("Could not create ds_xdg_shell_v6", NULL);
index 37f123780d725974cae30f0bb0c73ee20b4e6b71..366a58a58f9bdb27ebb300eecbaf626f4e7172c6 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "e_intern.h"
 
-EINTERN Eina_Bool e_xdg_shell_v6_init(struct wl_display *display);
+EINTERN Eina_Bool e_xdg_shell_v6_init(void);
 EINTERN E_Client *e_xdg_shell_v6_xdg_surface_ec_get(struct wl_resource *resource);
 
 #endif
index 11ce0b51ad73dc1fa4a0715cb36cb91ded78d459..9ef3f5f8dd5c267691816af8eab0a40ea5fa4fef 100644 (file)
@@ -113,12 +113,10 @@ static int
 _e_drag_finalize(E_Drag *drag, int x, int y)
 {
    E_View_Rect *rect;
-   E_Pointer* comp_pointer;
    const int color[4] = {0, 0, 0, 0};
 
    if (_drag_win) return 0;
-   if (!(comp_pointer = e_comp_pointer_get())) return 0;
-   _drag_win = e_comp_ee_win_get();
+   _drag_win = e_comp->ee_win;
    if (!e_comp_grab_input(1, 1))
      {
         _drag_win = 0;
@@ -133,7 +131,7 @@ _e_drag_finalize(E_Drag *drag, int x, int y)
         e_drag_view_set(drag, e_view_rect_view_get(rect));
      }
 
-   drag->angle = comp_pointer->rotation;
+   drag->angle = e_comp->pointer->rotation;
    e_drag_move(drag, x, y);
    e_drag_resize(drag, drag->w, drag->h);
    drag->visible = 1;
@@ -151,6 +149,7 @@ e_dnd_init(void)
 {
    if (!_event_handlers)
      {
+
         E_LIST_HANDLER_APPEND(_event_handlers, ECORE_EVENT_MOUSE_BUTTON_UP, _e_dnd_cb_mouse_up, NULL);
         E_LIST_HANDLER_PREPEND(_event_handlers, ECORE_EVENT_MOUSE_MOVE, _e_dnd_cb_mouse_move, NULL);
      }
@@ -338,11 +337,8 @@ _e_drag_map_apply(E_Drag *drag)
    int angle, drag_client_w, drag_client_h;
    E_Map *map = NULL, *new_map = NULL;
    Eina_Bool need_map_enable;
-   E_Comp_Wl_Data *comp_wl;
    E_View *view;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-
    angle = drag->angle;
 
    if (angle == 90)
@@ -350,11 +346,11 @@ _e_drag_map_apply(E_Drag *drag)
    else if (angle == 270)
       angle = 90;
 
-   view = e_view_client_view_get(e_client_view_get(comp_wl->drag_client));
+   view = e_view_client_view_get(e_client_view_get(e_comp_wl->drag_client));
    need_map_enable = e_view_map_enable_get(view) || (angle != 0);
    if (!need_map_enable) return;
 
-   map = e_client_map_get(comp_wl->drag_client);
+   map = e_client_map_get(e_comp_wl->drag_client);
 
    if (map)
      new_map = e_map_dup(map);
@@ -362,7 +358,7 @@ _e_drag_map_apply(E_Drag *drag)
      new_map = e_map_new();
    if (!new_map) goto fin;
 
-   e_client_geometry_get(comp_wl->drag_client, NULL, NULL, &drag_client_w, &drag_client_h);
+   e_client_geometry_get(e_comp_wl->drag_client, NULL, NULL, &drag_client_w, &drag_client_h);
    e_map_util_points_populate_from_geometry(new_map, drag->x, drag->y, drag_client_w, drag_client_h, 0);
    e_map_util_rotate(new_map, angle, drag->x, drag->y);
    e_map_util_object_move_sync_set(new_map, EINA_TRUE);
@@ -402,13 +398,13 @@ _e_dnd_cb_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
 {
    int x, y;
    Ecore_Event_Mouse_Move *ev = event;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   if (comp_wl && comp_wl->selection.target && comp_wl->drag)
+   if (e_comp_wl->selection.target &&
+       e_comp_wl->drag)
      {
         struct wl_resource *res;
         E_Client *ec = NULL;
-        E_Client *legacy_target = comp_wl->selection.target;
+        E_Client *legacy_target = e_comp_wl->selection.target;
         int device_id = e_comp_wl_data_current_device_id_get();
 
         x = ev->x;
@@ -432,15 +428,15 @@ _e_dnd_cb_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
         res = e_comp_wl_data_find_for_client(wl_resource_get_client(surface));
         EINA_SAFETY_ON_NULL_RETURN_VAL(res, ECORE_CALLBACK_RENEW);
 
-        if ((comp_wl->drag_offer != wl_resource_get_user_data(res)) &&
+        if ((e_comp_wl->drag_offer != wl_resource_get_user_data(res)) &&
             (ec != legacy_target))
           {
              e_comp_wl_data_device_send_leave(legacy_target);
              e_comp_wl_data_device_send_enter(ec);
           }
 
-        if (comp_wl->drag)
-          e_drag_move(comp_wl->drag, x, y);
+        if (e_comp_wl->drag)
+          e_drag_move(e_comp_wl->drag, x, y);
 
         e_comp_wl_data_device_send_motion(ec, x, y, ev->timestamp);
      }
@@ -453,16 +449,14 @@ static Eina_Bool
 _e_dnd_cb_zone_display_rotation_change_end(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
 {
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl;
 
    if (!_drag_current) return ECORE_CALLBACK_PASS_ON;
-   if (!(comp_wl = e_comp_wl_get())) return ECORE_CALLBACK_PASS_ON;
-   if (!(comp_wl->drag_source)) return ECORE_CALLBACK_PASS_ON;
+   if (!e_comp_wl->drag_source) return ECORE_CALLBACK_PASS_ON;
 
-   source = comp_wl->drag_source;
+   source = e_comp_wl->drag_source;
    source->accepted = EINA_FALSE;
    _e_drag_end(_drag_current, E_DND_DRAG_TYPE_DROPPED);
-   E_FREE(comp_wl->drag);
+   E_FREE(e_comp_wl->drag);
 
    return ECORE_CALLBACK_PASS_ON;
 }
index a9f6a7acd99196ff4a7dedd2fe3c582dc5266fae..60af3a3337d47960c63f5519964ec7f15e067bea 100644 (file)
@@ -1121,12 +1121,8 @@ _focus_policy_history_cb_zone_focus_reset(struct wl_listener *listener, void *da
    E_Zone *zone;
    E_Desk *desk;
    E_Client *ec;
-   E_Comp *comp;
    const Eina_List *l;
 
-   comp = e_comp_get();
-   EINA_SAFETY_ON_NULL_RETURN(comp);
-
    history_policy = wl_container_of(listener, history_policy, zone_focus_reset);
 
    E_FOCUS_HISTORY_TRACE(history_policy, NULL);
@@ -1142,7 +1138,7 @@ _focus_policy_history_cb_zone_focus_reset(struct wl_listener *listener, void *da
         if (!desk) continue;
         if (desk->visible && (!ec->iconic))
           {
-             if (comp->input_key_grabs || comp->input_mouse_grabs)
+             if (e_comp->input_key_grabs || e_comp->input_mouse_grabs)
                {
                   break;
                }
index 2f04e755842b8a6f6e1f7764423038cf75e9619c..3d6bb162d1b5446eab9bed0e3c0c3e02939d0641 100644 (file)
@@ -1,5 +1,4 @@
 #include "e_hints_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_scale_intern.h"
 #include "e_utils_intern.h"
 
@@ -186,11 +185,8 @@ e_hints_scale_update(void)
 {
    Eina_List *l;
    E_Comp_Wl_Output *output;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
-   if (!comp_wl) return;
-
-   EINA_LIST_FOREACH(comp_wl->outputs, l, output)
+   EINA_LIST_FOREACH(e_comp_wl->outputs, l, output)
      output->scale = e_scale;
 }
 
index 3d82cee895b74e5483bbf05fa1367c203e4c80a2..232b51225111d2ed40f4e5d889129bc67e6c2e52 100644 (file)
@@ -73,7 +73,7 @@ _e_magnifier_smart_init(void)
    zone = e_zone_current_get();
    EINA_SAFETY_ON_NULL_RETURN_VAL(zone, EINA_FALSE);
 
-   _e_magnifier_mgr = evas_object_smart_add(e_comp_evas_get(), _e_magnifier_smart_class_new());
+   _e_magnifier_mgr = evas_object_smart_add(e_comp->evas, _e_magnifier_smart_class_new());
    E_MAGNIFIER_SMART_DATA_GET_OR_RETURN(_e_magnifier_mgr, sd) EINA_FALSE;
 
    ELOGF("MAGNIFIER", "INIT Magnifier (%p)", NULL, _e_magnifier_mgr);
@@ -105,7 +105,7 @@ _e_magnifier_proxy_ec_new(E_Client *ec)
         return EINA_FALSE;
      }
 
-   ec->magnifier_proxy = evas_object_image_filled_add(e_comp_evas_get());
+   ec->magnifier_proxy = evas_object_image_filled_add(e_comp->evas);
    if (!ec->magnifier_proxy)
      {
         ELOGF("MAGNIFIER", "CAN NOT make PROXY object..", ec);
index 6880b2ed14e0818b0182a53c81b89cb0a40ca512..d1813bbec205688bc69261184b5929047d2a6808 100644 (file)
@@ -1,6 +1,5 @@
 #include "e_pointer_intern.h"
 #include "e_input_device_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_client_intern.h"
 #include "e_comp_canvas.h"
 #include "e_view_intern.h"
@@ -419,11 +418,9 @@ _e_pointer_view_hide(E_Pointer *ptr, E_View_Client *view_client)
    /* hide cursor object */
    if (e_view_client_visible_get(view_client))
      {
-        int comp_w = 0, comp_h = 0;
         res = EINA_TRUE;
         e_view_client_hide(view_client);
-        e_comp_size_get(&comp_w, &comp_h);
-        e_canvas_damage_rectangle_add(e_comp_canvas_get(), 0, 0, comp_w, comp_h);
+        e_canvas_damage_rectangle_add(e_comp_canvas_get(), 0, 0, e_comp->w, e_comp->h);
      }
 
    _e_pointer_view_set(ptr, NULL);
@@ -466,13 +463,11 @@ EINTERN void
 e_pointer_view_set(E_Pointer *ptr, E_View_Client *view_client, int x, int y)
 {
    Eina_Bool need_call_hide = EINA_FALSE;
-   E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
 
    EINA_SAFETY_ON_NULL_RETURN(ptr);
-   EINA_SAFETY_ON_NULL_RETURN(comp_wl);
 
    /* don't show cursor if in hidden mode */
-   if ((!e_config->show_cursor) || (!comp_wl->ptr.enabled))
+   if ((!e_config->show_cursor) || (!e_comp_wl->ptr.enabled))
      {
         if (ptr->view_client && _e_pointer_view_hide(ptr, ptr->view_client))
           _e_pointer_hook_call(E_POINTER_HOOK_HIDE, ptr);
index 96b04fb5ec48301d972aa69acf83b5cd9783d7a6..11bf3a5da8b54418f253c7b767f4778ce68b0334 100644 (file)
@@ -2400,7 +2400,7 @@ e_policy_init(void)
    E_Policy *pol;
    E_Zone *zone;
    E_Config_Policy_Desk *d;
-   const Eina_List *l, *comp_zone_list;
+   const Eina_List *l;
    int i, n;
 
    pol = E_NEW(E_Policy, 1);
@@ -2417,25 +2417,21 @@ e_policy_init(void)
    e_policy_wl_init();
    e_policy_wl_aux_hint_init();
 
-   comp_zone_list = e_comp_zone_list_get();
-   if (comp_zone_list)
+   EINA_LIST_FOREACH(e_comp->zones, l, zone)
      {
-        EINA_LIST_FOREACH(comp_zone_list, l, zone)
+        n = zone->desk_y_count * zone->desk_x_count;
+        for (i = 0; i < n; i++)
           {
-             n = zone->desk_y_count * zone->desk_x_count;
-             for (i = 0; i < n; i++)
+             if (e_config->use_configured_desks)
                {
-                  if (e_config->use_configured_desks)
-                    {
-                       d = _e_policy_desk_get_by_num(zone->num,
-                                                     zone->desks[i]->x,
-                                                     zone->desks[i]->y);
-                       if (d)
-                       e_policy_desk_add(zone->desks[i]);
-                    }
-                  else
+                  d = _e_policy_desk_get_by_num(zone->num,
+                                                zone->desks[i]->x,
+                                                zone->desks[i]->y);
+                  if (d)
                     e_policy_desk_add(zone->desks[i]);
                }
+             else
+               e_policy_desk_add(zone->desks[i]);
           }
      }
 
index ee8d6f5892efb136764cbd70f39f7178273d9770..00eba3c15eb2ac28e5019da088a04213605e4fd1 100644 (file)
@@ -210,10 +210,7 @@ _conf_state_update(Conformant_Type type, Eina_Bool visible, int x, int y, int w,
         else
           {
              uint32_t serial;
-             E_Comp_Wl_Data *comp_wl = e_comp_wl_get();
-             if (!comp_wl) continue;
-
-             serial = wl_display_next_serial(comp_wl->wl.disp);
+             serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
              tizen_policy_send_conformant_region
                 (cres->res,
@@ -844,7 +841,6 @@ _conf_cb_intercept_hook_hide(void *data EINA_UNUSED, E_Client *ec)
    Conformant_Type type;
    Defer_Job *job;
    uint32_t pre_serial, post_serial;
-   E_Comp_Wl_Data *comp_wl;
 
    if (!g_conf)
      return EINA_TRUE;//need to check
@@ -861,10 +857,7 @@ _conf_cb_intercept_hook_hide(void *data EINA_UNUSED, E_Client *ec)
    if (!g_conf->part[type].state.visible)
      return EINA_TRUE;
 
-   if (!(comp_wl = e_comp_wl_get()))
-      return EINA_FALSE;
-
-   pre_serial = wl_display_next_serial(comp_wl->wl.disp);
+   pre_serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    DBG("PART %s win(%zx) ec(%p) Intercept Hide", _conf_type_to_str(type), e_client_util_win_get(g_conf->part[type].ec), g_conf->part[type].ec);
    _conf_state_update(type,
index 16f2f6662f90ea2e058277b017da793c10bc1b61..ab166cce6d774a346f871d6dc3216b86a2400fbc 100644 (file)
@@ -1,5 +1,4 @@
 #include "services/e_service_cbhm_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_policy_conformant.h"
 #include "e_policy_wl_intern.h"
 #include "e_view_client_intern.h"
@@ -197,7 +196,6 @@ e_service_cbhm_client_set(E_Client *ec)
 {
    E_Policy_Cbhm *cbhm;
    E_Comp_Wl_Client_Data *cdata;
-   E_Comp_Wl_Data *comp_wl;
    E_View_Client *view_client;
 
    if (EINA_UNLIKELY(!ec))
@@ -221,8 +219,6 @@ e_service_cbhm_client_set(E_Client *ec)
         return;
      }
 
-    if (!(comp_wl = e_comp_wl_get())) return;
-
    ELOGF("CBHM", "Set Client", ec);
 
    cbhm = calloc(1, sizeof(*cbhm));
@@ -239,7 +235,7 @@ e_service_cbhm_client_set(E_Client *ec)
    ec->exp_iconify.skip_iconify = 1;
 
    cdata = e_client_cdata_get(ec);
-   comp_wl->selection.cbhm = cdata->surface;
+   e_comp_wl->selection.cbhm = cdata->surface;
    e_client_window_role_set(ec, "cbhm");
    e_policy_conformant_part_add(ec);
 
index ba8588e921a6221a1bdd3bcf63450b64c254afa2..06b32b42660ef2379b222405d043b82d0e62fc09 100644 (file)
@@ -66,15 +66,12 @@ static void
 _kvm_hook_drag_start(void *d EINA_UNUSED, E_Drag *drag)
 {
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl;
    E_Service_Kvm *esk;
    Eina_Iterator *it;
    struct wl_client *source_client, *kvm_client;
 
-
    if (!drag) return;
    if (!_kvm_service_hash) return;
-   if (!(comp_wl = e_comp_wl_get())) return;
 
    it = eina_hash_iterator_data_new(_kvm_service_hash);
 
@@ -83,7 +80,7 @@ _kvm_hook_drag_start(void *d EINA_UNUSED, E_Drag *drag)
          // Workaround: Feed mouse out/in to make sure that the mouse in to correct client.
          // The event mouse in/out is not emit during dragging(mouse move with mouse button pressed).
          // It makes the pointer still locked after mouse out from kvm window When the drag started.
-         source = comp_wl->drag_source;
+         source = e_comp_wl->drag_source;
          source_client = wl_resource_get_client(source->resource);
          kvm_client = wl_resource_get_client(esk->srv_kvm_res);
          if (source_client == kvm_client)
@@ -249,32 +246,28 @@ EINTERN Eina_Bool
 e_service_kvm_drop_perform(E_Service_Kvm *esk, E_Service_Kvm_Drop_Target drop_target)
 {
    E_Client *ec, *legacy_target_ec;
-   E_Comp_Wl_Data *comp_wl;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(esk, EINA_FALSE);
 
    ec = esk->ec;
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
 
-   comp_wl = e_comp_wl_get();
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-
    ELOGF("KVM", "Drop perform requested! service:%p", ec, esk);
 
    esk->perform_requested = EINA_TRUE;
 
    if (drop_target == E_SERVICE_KVM_DROP_TARGET_KVM_SERVICE)
      {
-        legacy_target_ec = comp_wl->selection.target;
+        legacy_target_ec = e_comp_wl->selection.target;
         if (legacy_target_ec != ec)
         {
            e_comp_wl_data_device_send_leave(legacy_target_ec);
            e_comp_wl_data_device_send_enter(ec);
-           e_comp_wl_data_offer_mimetype_action_accept(comp_wl->drag_offer);
+           e_comp_wl_data_offer_mimetype_action_accept(e_comp_wl->drag_offer);
         }
      }
 
-   e_drag_end(comp_wl->drag, E_DND_DRAG_TYPE_DROPPED);
+   e_drag_end(e_comp_wl->drag, E_DND_DRAG_TYPE_DROPPED);
 
    return EINA_TRUE;
 }
@@ -282,16 +275,11 @@ e_service_kvm_drop_perform(E_Service_Kvm *esk, E_Service_Kvm_Drop_Target drop_ta
 EINTERN Eina_Bool
 e_service_kvm_drag_cancel(E_Service_Kvm *esk)
 {
-   E_Comp_Wl_Data *comp_wl;
-
    EINA_SAFETY_ON_NULL_RETURN_VAL(esk, EINA_FALSE);
 
-   comp_wl = e_comp_wl_get();
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl, EINA_FALSE);
-
    ELOGF("KVM", "Cancel drag by kvm_service request! service:%p", esk->ec, esk);
 
-   e_drag_end(comp_wl->drag, E_DND_DRAG_TYPE_CANCELLED_BY_KVM);
+   e_drag_end(e_comp_wl->drag, E_DND_DRAG_TYPE_CANCELLED_BY_KVM);
 
    return EINA_TRUE;
 }
@@ -336,20 +324,17 @@ EINTERN Eina_Bool
 e_service_kvm_send_source_mimetypes(E_Service_Kvm *esk)
 {
    E_Comp_Wl_Data_Source *source;
-   E_Comp_Wl_Data *comp_wl;
    Eina_Iterator *it;
    char *mimetype;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(esk, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(esk->ec, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(esk->srv_kvm_res, EINA_FALSE);
-
-   comp_wl = e_comp_wl_get();
-   EINA_SAFETY_ON_NULL_RETURN_VAL(comp_wl->drag_source, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl->drag_source, EINA_FALSE);
 
    ELOGF("KVM", "Source mimes send!", esk->ec);
 
-   source = (E_Comp_Wl_Data_Source *) comp_wl->drag_source;
+   source = (E_Comp_Wl_Data_Source *) e_comp_wl->drag_source;
 
    tws_service_kvm_send_source_mimes(esk->srv_kvm_res, NULL);
    it = eina_array_iterator_new(source->mime_types);
@@ -490,15 +475,13 @@ e_service_kvm_shutdown()
 static void
 _e_service_kvm_send_client_enter(E_Client *ec)
 {
-   E_Comp_Wl_Data *comp_wl;
    struct wl_resource *data_device_res, *offer_res;
    struct wl_resource *surface;
    uint32_t serial;
    int x, y;
 
-   if (!(comp_wl = e_comp_wl_get())) return;
-   if (!comp_wl->drag_source) return;
-   if (comp_wl->selection.target == ec) return;
+   if (!e_comp_wl->drag_source) return;
+   if (e_comp_wl->selection.target == ec) return;
 
    surface = e_comp_wl_client_surface_get(ec);
    if (!surface) return;
@@ -509,9 +492,9 @@ _e_service_kvm_send_client_enter(E_Client *ec)
    offer_res = e_comp_wl_data_device_send_offer(ec);
    if (!offer_res) return;
 
-   x = wl_fixed_to_int(comp_wl->ptr.x) - ec->client.x;
-   y = wl_fixed_to_int(comp_wl->ptr.y) - ec->client.y;
-   serial = wl_display_next_serial(comp_wl->wl.disp);
+   x = wl_fixed_to_int(e_comp_wl->ptr.x) - ec->client.x;
+   y = wl_fixed_to_int(e_comp_wl->ptr.y) - ec->client.y;
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_data_device_send_enter(data_device_res, serial, surface,
                              wl_fixed_from_int(x), wl_fixed_from_int(y), offer_res);
 }
index 22ac5a4ef2c93364204ddb699ef920d8349289d0..99210a1f7a5677f4adaca1a9d6fda735887b6c66 100644 (file)
@@ -1,7 +1,6 @@
 #include "services/e_service_launcher_intern.h"
 #include "e_comp_wl_rsm_intern.h"
 #include "e_comp_wl_tbm_intern.h"
-#include "e_comp_wl_intern.h"
 #include "e_devicemgr_intern.h"
 #include "e_policy_intern.h"
 #include "e_policy_wl_intern.h"
@@ -120,11 +119,9 @@ static Eina_List *
 _launcher_clients_find_by_pid(pid_t pid)
 {
    E_Client *ec;
-   Eina_List *clients = NULL, *l, *comp_ec_list;
+   Eina_List *clients = NULL, *l;
 
-   if (!(comp_ec_list = e_comp_ec_list_get())) return NULL;
-
-   EINA_LIST_FOREACH(comp_ec_list, l, ec)
+   EINA_LIST_FOREACH(e_comp->clients, l, ec)
      {
         if (e_object_is_del(E_OBJECT(ec))) continue;
         if (ec->netwm.pid != pid) continue;
@@ -598,7 +595,7 @@ _launcher_prepare_shared_widget_backward_send(E_Service_Launcher *lc,
    _launcher_target_ec_set(lc, target_ec);
 
    lc->direction = TWS_SERVICE_LAUNCHER_DIRECTION_BACKWARD;
-   lc->serial = wl_display_next_serial(e_comp_wl_display_get());
+   lc->serial = wl_display_next_serial(e_comp_wl->wl.disp);
 
    sent = e_tzsh_shared_widget_launch_prepare_send(target_ec,
                                                    TWS_SHARED_WIDGET_LAUNCH_PREPARE_STATE_WIDGET_HIDE,
@@ -720,7 +717,7 @@ _launcher_prepare_backward_send(E_Service_Launcher *lc,
    _launcher_launched_ec_set(lc, NULL);
    _launcher_target_ec_set(lc, target_ec);
 
-   lc->serial = wl_display_next_serial(e_comp_wl_display_get());
+   lc->serial = wl_display_next_serial(e_comp_wl->wl.disp);
    lc->direction = TWS_SERVICE_LAUNCHER_DIRECTION_BACKWARD;
    e_client_pos_get(target_ec, &x, &y);
 
@@ -1248,7 +1245,7 @@ _launcher_target_ec_queue_flush(E_Service_Launcher *lc)
 {
    struct wayland_tbm_client_queue *cqueue;
 
-   if (!e_comp_wl_get()) return;
+   if (!e_comp_wl) return;
    if (!lc) return;
    if (!lc->target.ec) return;
    if (e_object_is_del(E_OBJECT(lc->target.ec))) return;
index 097897c7d78f287efde98f2507ae2b78e981ac40..727764d2fc845f0b997cad67eb47dd534d219ba9 100644 (file)
@@ -2326,7 +2326,7 @@ e_service_quickpanel_client_add(E_Client *ec, E_Service_Quickpanel_Type type)
    if (e_config->qp_use_bg_rect)
      {
         Evas_Object *o;
-        o = evas_object_rectangle_add(e_comp_evas_get());
+        o = evas_object_rectangle_add(e_comp->evas);
 
         qp->bg_rect = o;
         evas_object_layer_set(o, E_POLICY_QUICKPANEL_LAYER);
index ef15a748c1aa924a4efa94ba2d9475a7ff6eecce..6e4b511ae093d19a3151fd5ed0094ee1589a1461 100644 (file)
@@ -128,7 +128,7 @@ e_service_region_object_new(E_Client *ec)
    if (!region)
      return NULL;
 
-   o = evas_object_rectangle_add(e_comp_evas_get());
+   o = evas_object_rectangle_add(e_comp->evas);
    evas_object_color_set(o, 0, 0, 0, 0);
    evas_object_repeat_events_set(o, EINA_TRUE);
    region->obj = o;
index 35dd5065986d42fac0ecfa1745674fe4959e5d5c..2817f257c5ea033958a9359910892aea04a46659 100644 (file)
@@ -3,7 +3,6 @@
 #include "e_client_intern.h"
 #include "e_view_intern.h"
 #include "e_view_client_intern.h"
-#include "e_comp_wl_intern.h"
 
 #include <wayland-server.h>
 #include <tzsh_server.h>
@@ -69,7 +68,7 @@ _volume_region_obj_cb_mouse_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
    uint32_t serial;
    E_Comp_Wl_Client_Data *volume_cdata = e_client_cdata_get(_volume_ec);
 
-   serial = wl_display_next_serial(e_comp_wl_display_get());
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_touch_send_down(_volume_wl_touch, serial, e->timestamp,
                       volume_cdata->surface, 0,
                       wl_fixed_from_int(e->canvas.x - _volume_ec->client.x),
@@ -82,7 +81,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_display_get());
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_touch_send_up(_volume_wl_touch, serial, e->timestamp, 0);
 }
 
@@ -93,7 +92,7 @@ _volume_region_obj_cb_multi_down(void *data EINA_UNUSED, Evas *evas EINA_UNUSED,
    uint32_t serial;
    E_Comp_Wl_Client_Data *volume_cdata = e_client_cdata_get(_volume_ec);
 
-   serial = wl_display_next_serial(e_comp_wl_display_get());
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_touch_send_down(_volume_wl_touch, serial, e->timestamp,
                       volume_cdata->surface, e->device,
                       wl_fixed_from_int(e->canvas.x - _volume_ec->client.x),
@@ -106,7 +105,7 @@ _volume_region_obj_cb_multi_up(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, E
    Evas_Event_Multi_Up *e = event;
    uint32_t serial;
 
-   serial = wl_display_next_serial(e_comp_wl_display_get());
+   serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wl_touch_send_up(_volume_wl_touch, serial, e->timestamp, e->device);
 }
 
@@ -436,15 +435,12 @@ _volume_wl_touch_resource_get(void)
    Eina_List *l;
    struct wl_client *wc;
    struct wl_resource *res;
-   E_Comp_Wl_Data *comp_wl;
-   E_Comp_Wl_Client_Data *volume_cdata;
+   E_Comp_Wl_Client_Data *volume_cdata = e_client_cdata_get(_volume_ec);
 
-   if (!(comp_wl = e_comp_wl_get())) return NULL;
-   if (!(volume_cdata = e_client_cdata_get(_volume_ec))) return NULL;
    if (_volume_wl_touch) goto end;
 
    wc = wl_resource_get_client(volume_cdata->surface);
-   EINA_LIST_FOREACH(comp_wl->touch.resources, l, res)
+   EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
 
index c8709a606a372a5fea2ee9c5c967709ffa4419c6..d67cafba941cfd6f8a98dc396c3396a43b6bd387 100644 (file)
@@ -173,6 +173,7 @@ _e_bq_mgr_free(E_Bq_Mgr *bq_mgr)
 static E_Bq_Mgr *
 _e_bq_mgr_new(char *sock_name)
 {
+   E_Comp *comp;
    E_Bq_Mgr *bq_mgr;
    int fd;
    static char *default_sock_name = "e_bq_mgr_daemon";
@@ -182,8 +183,8 @@ _e_bq_mgr_new(char *sock_name)
    if (!bq_mgr)
      return NULL;
 
-   /* check the current compositor is exist or not*/
-   if (!(e_comp_screen_get()))
+   /* try to get the current compositor */
+   if (!(comp = e_comp))
      {
         free(bq_mgr);
         return NULL;
@@ -242,7 +243,7 @@ _e_bq_mgr_new(char *sock_name)
    else
      {
         /* try to get the compositor data */
-        bq_mgr->wdpy = e_comp_wl_display_get();
+        bq_mgr->wdpy = e_comp_wl->wl.disp;
         bq_mgr->loop = wl_display_get_event_loop(bq_mgr->wdpy);
         bq_mgr->self_dpy = 0;
      }