forked from enlightenment/efl
ecore/wayland: Use eina_inlist instead of wl_list for outputs too.
This commit is contained in:
parent
18ef47c173
commit
d1a9314cdd
|
@ -403,7 +403,7 @@ EAPI void ecore_wl_input_cursor_from_name_set(Ecore_Wl_Input *input, const char
|
|||
EAPI void ecore_wl_input_cursor_default_restore(Ecore_Wl_Input *input);
|
||||
EAPI struct wl_seat *ecore_wl_input_seat_get(Ecore_Wl_Input *input);
|
||||
|
||||
EAPI struct wl_list *ecore_wl_outputs_get(void);
|
||||
EAPI Eina_Inlist *ecore_wl_outputs_get(void);
|
||||
|
||||
/**
|
||||
* Retrieves the Wayland Globals Interface list used for the current Wayland connection.
|
||||
|
|
|
@ -181,7 +181,6 @@ ecore_wl_init(const char *name)
|
|||
ecore_idle_enterer_add(_ecore_wl_cb_idle_enterer, _ecore_wl_disp);
|
||||
|
||||
wl_list_init(&_ecore_wl_disp->inputs);
|
||||
wl_list_init(&_ecore_wl_disp->outputs);
|
||||
|
||||
_ecore_wl_disp->wl.registry =
|
||||
wl_display_get_registry(_ecore_wl_disp->wl.display);
|
||||
|
@ -426,12 +425,12 @@ _ecore_wl_shutdown(Eina_Bool close)
|
|||
|
||||
if ((close) && (!_ecore_wl_fatal_error))
|
||||
{
|
||||
Ecore_Wl_Output *out, *tout;
|
||||
Ecore_Wl_Output *out;
|
||||
Ecore_Wl_Input *in, *tin;
|
||||
Ecore_Wl_Global *global;
|
||||
Eina_Inlist *tmp;
|
||||
|
||||
wl_list_for_each_safe(out, tout, &_ecore_wl_disp->outputs, link)
|
||||
EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->outputs, tmp, out)
|
||||
_ecore_wl_output_del(out);
|
||||
|
||||
wl_list_for_each_safe(in, tin, &_ecore_wl_disp->inputs, link)
|
||||
|
|
|
@ -20,10 +20,10 @@ static const struct wl_output_listener _ecore_wl_output_listener =
|
|||
};
|
||||
|
||||
/* @since 1.2 */
|
||||
EAPI struct wl_list *
|
||||
EAPI Eina_Inlist *
|
||||
ecore_wl_outputs_get(void)
|
||||
{
|
||||
return &(_ecore_wl_disp->outputs);
|
||||
return _ecore_wl_disp->outputs;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -42,7 +42,7 @@ _ecore_wl_output_add(Ecore_Wl_Display *ewd, unsigned int id)
|
|||
output->output =
|
||||
wl_registry_bind(ewd->wl.registry, id, &wl_output_interface, 2);
|
||||
|
||||
wl_list_insert(ewd->outputs.prev, &output->link);
|
||||
ewd->outputs = eina_inlist_append(ewd->outputs, EINA_INLIST_GET(output));
|
||||
wl_output_add_listener(output->output, &_ecore_wl_output_listener, output);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,8 @@ _ecore_wl_output_del(Ecore_Wl_Output *output)
|
|||
if (!output) return;
|
||||
if (output->destroy) (*output->destroy)(output, output->data);
|
||||
if (output->output) wl_output_destroy(output->output);
|
||||
wl_list_remove(&output->link);
|
||||
_ecore_wl_disp->outputs = eina_inlist_remove
|
||||
(_ecore_wl_disp->outputs, EINA_INLIST_GET(output));
|
||||
free(output);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ struct _Ecore_Wl_Display
|
|||
Ecore_Idle_Enterer *idle_enterer;
|
||||
|
||||
struct wl_list inputs;
|
||||
struct wl_list outputs;
|
||||
Eina_Inlist *outputs;
|
||||
Eina_Inlist *globals; /** @since 1.7.6 */
|
||||
|
||||
Eina_Bool init_done;
|
||||
|
@ -204,12 +204,12 @@ struct _Ecore_Wl_Input
|
|||
|
||||
struct _Ecore_Wl_Output
|
||||
{
|
||||
EINA_INLIST;
|
||||
Ecore_Wl_Display *display;
|
||||
struct wl_output *output;
|
||||
Eina_Rectangle allocation;
|
||||
int mw, mh;
|
||||
int transform;
|
||||
struct wl_list link;
|
||||
|
||||
void (*destroy) (Ecore_Wl_Output *output, void *data);
|
||||
void *data;
|
||||
|
|
Loading…
Reference in New Issue