diff options
author | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-04 14:24:59 -0200 |
---|---|---|
committer | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-04 14:24:59 -0200 |
commit | b5e68552661dde72aa9a8643830fdb42aa84e525 (patch) | |
tree | d55670e33b87fe4f54d9f0ed2cbffcaca6e734f3 /src/lib/ecore_wayland | |
parent | d1a9314cddfb21763ca2d8a66a5ad7b12f82cd6e (diff) |
ecore/wayland: Use eina_inlist instead of wl_list for inputs too.
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl.c | 6 | ||||
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_input.c | 5 | ||||
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_private.h | 5 | ||||
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_window.c | 2 |
4 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c index bd68d4ed76..e1b525f8db 100644 --- a/src/lib/ecore_wayland/ecore_wl.c +++ b/src/lib/ecore_wayland/ecore_wl.c | |||
@@ -180,8 +180,6 @@ ecore_wl_init(const char *name) | |||
180 | _ecore_wl_disp->idle_enterer = | 180 | _ecore_wl_disp->idle_enterer = |
181 | ecore_idle_enterer_add(_ecore_wl_cb_idle_enterer, _ecore_wl_disp); | 181 | ecore_idle_enterer_add(_ecore_wl_cb_idle_enterer, _ecore_wl_disp); |
182 | 182 | ||
183 | wl_list_init(&_ecore_wl_disp->inputs); | ||
184 | |||
185 | _ecore_wl_disp->wl.registry = | 183 | _ecore_wl_disp->wl.registry = |
186 | wl_display_get_registry(_ecore_wl_disp->wl.display); | 184 | wl_display_get_registry(_ecore_wl_disp->wl.display); |
187 | wl_registry_add_listener(_ecore_wl_disp->wl.registry, | 185 | wl_registry_add_listener(_ecore_wl_disp->wl.registry, |
@@ -426,14 +424,14 @@ _ecore_wl_shutdown(Eina_Bool close) | |||
426 | if ((close) && (!_ecore_wl_fatal_error)) | 424 | if ((close) && (!_ecore_wl_fatal_error)) |
427 | { | 425 | { |
428 | Ecore_Wl_Output *out; | 426 | Ecore_Wl_Output *out; |
429 | Ecore_Wl_Input *in, *tin; | 427 | Ecore_Wl_Input *in; |
430 | Ecore_Wl_Global *global; | 428 | Ecore_Wl_Global *global; |
431 | Eina_Inlist *tmp; | 429 | Eina_Inlist *tmp; |
432 | 430 | ||
433 | EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->outputs, tmp, out) | 431 | EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->outputs, tmp, out) |
434 | _ecore_wl_output_del(out); | 432 | _ecore_wl_output_del(out); |
435 | 433 | ||
436 | wl_list_for_each_safe(in, tin, &_ecore_wl_disp->inputs, link) | 434 | EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->inputs, tmp, in) |
437 | _ecore_wl_input_del(in); | 435 | _ecore_wl_input_del(in); |
438 | 436 | ||
439 | EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->globals, tmp, global) | 437 | EINA_INLIST_FOREACH_SAFE(_ecore_wl_disp->globals, tmp, global) |
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index bd1e01042d..b4f1a4d48f 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c | |||
@@ -318,7 +318,7 @@ _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) | |||
318 | 318 | ||
319 | input->seat = | 319 | input->seat = |
320 | wl_registry_bind(ewd->wl.registry, id, &wl_seat_interface, 1); | 320 | wl_registry_bind(ewd->wl.registry, id, &wl_seat_interface, 1); |
321 | wl_list_insert(ewd->inputs.prev, &input->link); | 321 | ewd->inputs = eina_inlist_append(ewd->inputs, EINA_INLIST_GET(input)); |
322 | 322 | ||
323 | wl_seat_add_listener(input->seat, | 323 | wl_seat_add_listener(input->seat, |
324 | &_ecore_wl_seat_listener, input); | 324 | &_ecore_wl_seat_listener, input); |
@@ -385,7 +385,8 @@ _ecore_wl_input_del(Ecore_Wl_Input *input) | |||
385 | if (input->cursor_surface) | 385 | if (input->cursor_surface) |
386 | wl_surface_destroy(input->cursor_surface); | 386 | wl_surface_destroy(input->cursor_surface); |
387 | 387 | ||
388 | wl_list_remove(&input->link); | 388 | _ecore_wl_disp->inputs = eina_inlist_remove |
389 | (_ecore_wl_disp->inputs, EINA_INLIST_GET(input)); | ||
389 | if (input->seat) wl_seat_destroy(input->seat); | 390 | if (input->seat) wl_seat_destroy(input->seat); |
390 | 391 | ||
391 | if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr); | 392 | if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr); |
diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h index e1ac6126bd..0b11e1fe56 100644 --- a/src/lib/ecore_wayland/ecore_wl_private.h +++ b/src/lib/ecore_wayland/ecore_wl_private.h | |||
@@ -72,7 +72,7 @@ struct _Ecore_Wl_Display | |||
72 | Ecore_Fd_Handler *fd_hdl; | 72 | Ecore_Fd_Handler *fd_hdl; |
73 | Ecore_Idle_Enterer *idle_enterer; | 73 | Ecore_Idle_Enterer *idle_enterer; |
74 | 74 | ||
75 | struct wl_list inputs; | 75 | Eina_Inlist *inputs; |
76 | Eina_Inlist *outputs; | 76 | Eina_Inlist *outputs; |
77 | Eina_Inlist *globals; /** @since 1.7.6 */ | 77 | Eina_Inlist *globals; /** @since 1.7.6 */ |
78 | 78 | ||
@@ -152,6 +152,7 @@ struct _Ecore_Wl_Window | |||
152 | 152 | ||
153 | struct _Ecore_Wl_Input | 153 | struct _Ecore_Wl_Input |
154 | { | 154 | { |
155 | EINA_INLIST; | ||
155 | Ecore_Wl_Display *display; | 156 | Ecore_Wl_Display *display; |
156 | struct wl_seat *seat; | 157 | struct wl_seat *seat; |
157 | struct wl_pointer *pointer; | 158 | struct wl_pointer *pointer; |
@@ -178,8 +179,6 @@ struct _Ecore_Wl_Input | |||
178 | unsigned int pointer_enter_serial; | 179 | unsigned int pointer_enter_serial; |
179 | int sx, sy; | 180 | int sx, sy; |
180 | 181 | ||
181 | struct wl_list link; | ||
182 | |||
183 | Ecore_Wl_Window *grab; | 182 | Ecore_Wl_Window *grab; |
184 | unsigned int grab_button; | 183 | unsigned int grab_button; |
185 | 184 | ||
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index b0f66dd70c..a1225d0f11 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c | |||
@@ -104,7 +104,7 @@ ecore_wl_window_free(Ecore_Wl_Window *win) | |||
104 | 104 | ||
105 | eina_hash_del(_windows, _ecore_wl_window_id_str_get(win->id), win); | 105 | eina_hash_del(_windows, _ecore_wl_window_id_str_get(win->id), win); |
106 | 106 | ||
107 | wl_list_for_each(input, &_ecore_wl_disp->inputs, link) | 107 | EINA_INLIST_FOREACH(_ecore_wl_disp->inputs, input) |
108 | { | 108 | { |
109 | if ((input->pointer_focus) && (input->pointer_focus == win)) | 109 | if ((input->pointer_focus) && (input->pointer_focus == win)) |
110 | input->pointer_focus = NULL; | 110 | input->pointer_focus = NULL; |