ecore-wl cursor setup no longer triggers errors on startup
@fix T2202
This commit is contained in:
parent
5ff4539333
commit
37c2451b5f
|
@ -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 =
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue