summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-10 15:58:16 -0600
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-15 13:47:17 -0600
commitbe3020b0ab53121757c11daefc22a2c575c8cf3d (patch)
tree7149e8050d0220ca5f83ade6ba068e42d2ae865a /src
parent625955a597a66e81a2f226151a436902ea39c3f0 (diff)
ecore_wl2: Convert frame callbacks to inlist
They're only ever on a single list, and never counted. inlist makes more sense. Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com> Reviewed-by: Chris Michael <cp.michael@samsung.com> Differential Revision: https://phab.enlightenment.org/D7610
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h3
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 1ac9b44808..e62ea5f8ea 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -147,6 +147,7 @@ struct _Ecore_Wl2_Aux_Hint
147 147
148struct _Ecore_Wl2_Frame_Cb_Handle 148struct _Ecore_Wl2_Frame_Cb_Handle
149{ 149{
150 EINA_INLIST;
150 Ecore_Wl2_Window *win; 151 Ecore_Wl2_Window *win;
151 Ecore_Wl2_Frame_Cb cb; 152 Ecore_Wl2_Frame_Cb cb;
152 void *data; 153 void *data;
@@ -221,7 +222,7 @@ struct _Ecore_Wl2_Window
221 222
222 Eina_Inlist *subsurfs; 223 Eina_Inlist *subsurfs;
223 Eina_List *supported_aux_hints; 224 Eina_List *supported_aux_hints;
224 Eina_List *frame_callbacks; 225 Eina_Inlist *frame_callbacks;
225 226
226 Eina_List *outputs; 227 Eina_List *outputs;
227 228
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 0a61e596ab..71c74f3284 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1418,13 +1418,13 @@ _frame_cb(void *data, struct wl_callback *callback, uint32_t timestamp)
1418{ 1418{
1419 Ecore_Wl2_Frame_Cb_Handle *cb; 1419 Ecore_Wl2_Frame_Cb_Handle *cb;
1420 Ecore_Wl2_Window *window; 1420 Ecore_Wl2_Window *window;
1421 Eina_List *l, *ll; 1421 Eina_Inlist *l;
1422 1422
1423 window = data; 1423 window = data;
1424 window->commit_pending = EINA_FALSE; 1424 window->commit_pending = EINA_FALSE;
1425 wl_callback_destroy(callback); 1425 wl_callback_destroy(callback);
1426 window->callback = NULL; 1426 window->callback = NULL;
1427 EINA_LIST_FOREACH_SAFE(window->frame_callbacks, l, ll, cb) 1427 EINA_INLIST_FOREACH_SAFE(window->frame_callbacks, l, cb)
1428 cb->cb(window, timestamp, cb->data); 1428 cb->cb(window, timestamp, cb->data);
1429} 1429}
1430 1430
@@ -1652,7 +1652,7 @@ ecore_wl2_window_frame_callback_add(Ecore_Wl2_Window *window, Ecore_Wl2_Frame_Cb
1652 callback->data = data; 1652 callback->data = data;
1653 callback->win = window; 1653 callback->win = window;
1654 window->frame_callbacks = 1654 window->frame_callbacks =
1655 eina_list_append(window->frame_callbacks, callback); 1655 eina_inlist_append(window->frame_callbacks, EINA_INLIST_GET(callback));
1656 return callback; 1656 return callback;
1657} 1657}
1658 1658
@@ -1662,7 +1662,7 @@ ecore_wl2_window_frame_callback_del(Ecore_Wl2_Frame_Cb_Handle *handle)
1662 EINA_SAFETY_ON_NULL_RETURN(handle); 1662 EINA_SAFETY_ON_NULL_RETURN(handle);
1663 1663
1664 handle->win->frame_callbacks = 1664 handle->win->frame_callbacks =
1665 eina_list_remove(handle->win->frame_callbacks, handle); 1665 eina_inlist_remove(handle->win->frame_callbacks, EINA_INLIST_GET(handle));
1666 free(handle); 1666 free(handle);
1667} 1667}
1668 1668