discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=32adc0e901777047d2569742cc44dabbcef58f19

commit 32adc0e901777047d2569742cc44dabbcef58f19
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Aug 13 16:01:08 2015 -0400

    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 bec3a56..57e7c92 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 74f3932..80c08f1 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 6051514..ab97c3b 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 9c6e8d9..471c073 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;

-- 


Reply via email to