From 32adc0e901777047d2569742cc44dabbcef58f19 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 13 Aug 2015 16:01:08 -0400 Subject: [PATCH] add e_comp_x and e_comp_wl globals constantly typing e_comp->x/wl_comp_data-> is tiring --- src/bin/e_comp.c | 2 ++ src/bin/e_comp.h | 2 ++ src/bin/e_comp_wl.c | 2 +- src/bin/e_comp_x.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index bec3a5697..57e7c924a 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -22,6 +22,8 @@ static Eina_List *handlers = NULL; static Eina_List *hooks = NULL; E_API E_Comp *e_comp = NULL; +E_API E_Comp_X_Data *e_comp_x = NULL; +E_API E_Comp_Wl_Data *e_comp_wl = NULL; static Eina_Hash *ignores = NULL; static Eina_List *actions = NULL; diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 74f393262..80c08f1e8 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -174,6 +174,8 @@ typedef enum } E_Comp_Engine; extern E_API E_Comp *e_comp; +extern E_API E_Comp_X_Data *e_comp_x; +extern E_API E_Comp_Wl_Data *e_comp_wl; EINTERN Eina_Bool e_comp_init(void); E_API E_Comp *e_comp_new(void); diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 605151416..ab97c3bb6 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2441,7 +2441,7 @@ _e_comp_wl_compositor_create(void) } /* set compositor wayland data */ - e_comp->wl_comp_data = cdata; + e_comp_wl = e_comp->wl_comp_data = cdata; /* set wayland log handler */ wl_log_set_handler_server(_e_comp_wl_log_cb_print); diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 9c6e8d9bb..471c073a7 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -5051,7 +5051,7 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h) if (!ecore_x_window_manage(root)) return EINA_FALSE; E_OBJECT_DEL_SET(e_comp, _e_comp_x_del); - e_comp->x_comp_data = E_NEW(E_Comp_X_Data, 1); + e_comp_x = e_comp->x_comp_data = E_NEW(E_Comp_X_Data, 1); ecore_x_e_window_profile_supported_set(root, e_config->use_desktop_window_profile); e_comp->cm_selection = ecore_x_window_input_new(root, 0, 0, 1, 1); if (!e_comp->cm_selection) return EINA_FALSE;