discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=37c2451b5f02895f9eb8686da56698135eeec658
commit 37c2451b5f02895f9eb8686da56698135eeec658 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Thu Mar 12 15:49:03 2015 -0400 ecore-wl cursor setup no longer triggers errors on startup @fix T2202 --- src/lib/ecore_wayland/ecore_wl.c | 6 +----- src/lib/ecore_wayland/ecore_wl_input.c | 33 +++++++++++++++++++------------- src/lib/ecore_wayland/ecore_wl_private.h | 1 + 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c index 7e6d46d..0446964 100644 --- a/src/lib/ecore_wayland/ecore_wl.c +++ b/src/lib/ecore_wayland/ecore_wl.c @@ -662,11 +662,7 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in ewd->wl.shm = wl_registry_bind(registry, id, &wl_shm_interface, 1); if (ewd->input) - { - ewd->cursor_theme = - wl_cursor_theme_load(ewd->input->cursor_theme_name, - ewd->input->cursor_size, ewd->wl.shm); - } + _ecore_wl_input_setup(ewd->input); else { ewd->cursor_theme = diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index 32f7e55..c91e6b7 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -356,14 +356,29 @@ ecore_wl_input_seat_get(Ecore_Wl_Input *input) } /* local functions */ -void -_ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) +void +_ecore_wl_input_setup(Ecore_Wl_Input *input) { - Ecore_Wl_Input *input; char *temp; unsigned int cursor_size; char *cursor_theme_name; + temp = getenv("ECORE_WL_CURSOR_SIZE"); + if (temp) + cursor_size = atoi(temp); + else + cursor_size = ECORE_WL_DEFAULT_CURSOR_SIZE; + ecore_wl_input_cursor_size_set(input, cursor_size); + + cursor_theme_name = getenv("ECORE_WL_CURSOR_THEME_NAME"); + ecore_wl_input_cursor_theme_name_set(input, cursor_theme_name); +} + +void +_ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) +{ + Ecore_Wl_Input *input; + LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!(input = malloc(sizeof(Ecore_Wl_Input)))) return; @@ -375,16 +390,8 @@ _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) input->keyboard_focus = NULL; input->touch_focus = NULL; - temp = getenv("ECORE_WL_CURSOR_SIZE"); - if (temp) - cursor_size = atoi(temp); - else - cursor_size = ECORE_WL_DEFAULT_CURSOR_SIZE; - ecore_wl_input_cursor_size_set(input, cursor_size); - - cursor_theme_name = getenv("ECORE_WL_CURSOR_THEME_NAME"); - ecore_wl_input_cursor_theme_name_set(input, cursor_theme_name); - + if (ewd->wl.shm) + _ecore_wl_input_setup(input); input->seat = wl_registry_bind(ewd->wl.registry, id, &wl_seat_interface, 1); ewd->inputs = eina_inlist_append(ewd->inputs, EINA_INLIST_GET(input)); diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h index 52b7a9b..d0aeeb5 100644 --- a/src/lib/ecore_wayland/ecore_wl_private.h +++ b/src/lib/ecore_wayland/ecore_wl_private.h @@ -286,6 +286,7 @@ Eina_Hash *_ecore_wl_window_hash_get(void); void _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id); void _ecore_wl_output_del(Ecore_Wl_Output *output); +void _ecore_wl_input_setup(Ecore_Wl_Input *input); void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id); void _ecore_wl_input_del(Ecore_Wl_Input *input); void _ecore_wl_input_pointer_xy_get(int *x, int *y); --