add e_comp_x and e_comp_wl globals
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 13 Aug 2015 20:01:08 +0000 (16:01 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 13 Aug 2015 20:01:08 +0000 (16:01 -0400)
constantly typing e_comp->x/wl_comp_data-> is tiring

src/bin/e_comp.c
src/bin/e_comp.h
src/bin/e_comp_wl.c
src/bin/e_comp_x.c

index bec3a56..57e7c92 100644 (file)
@@ -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;
 
index 74f3932..80c08f1 100644 (file)
@@ -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);
index 6051514..ab97c3b 100644 (file)
@@ -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);
index 9c6e8d9..471c073 100644 (file)
@@ -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;