[EGIT] [core/efl] master 02/02: Ecore evas: Fix compilation warning (missing initializer)
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f80409db30efc74d5451e676ba208cbe08206e46 commit f80409db30efc74d5451e676ba208cbe08206e46 Author: Jean-Philippe Andre Date: Wed Feb 3 14:53:54 2016 +0900 Ecore evas: Fix compilation warning (missing initializer) --- src/lib/ecore_evas/ecore_evas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index 6a4f3fb..bf950bf 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3076,7 +3076,7 @@ ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport) { Ecore_Evas *subee; Eina_List *l; - Efl_Core_Event_Animator_Tick a = { { 0 } }; + Efl_Core_Event_Animator_Tick a = { { 0, 0, 0, 0 } }; if (!viewport) { --
[EGIT] [core/efl] master 01/02: Evas engines: Add missing initializers in Ecore_Evas_Engine_Func
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2405c93f2c9a7945a310fffd144489e44254a913 commit 2405c93f2c9a7945a310fffd144489e44254a913 Author: Jean-Philippe Andre Date: Wed Feb 3 14:48:45 2016 +0900 Evas engines: Add missing initializers in Ecore_Evas_Engine_Func --- src/lib/ecore_evas/ecore_evas_buffer.c| 5 - src/lib/ecore_evas/ecore_evas_ews.c | 5 - src/modules/ecore_evas/engines/extn/ecore_evas_extn.c | 5 - 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c index 33dbc63..be87234 100644 --- a/src/lib/ecore_evas/ecore_evas_buffer.c +++ b/src/lib/ecore_evas/ecore_evas_buffer.c @@ -602,7 +602,10 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func = NULL, // wm_rot_manual_rotation_done_set NULL, // wm_rot_manual_rotation_done - NULL // aux_hints_set + NULL, // aux_hints_set + + NULL, // fn_animator_register + NULL, // fn_animator_unregister }; static void * diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c index cf4e6e3..d409952 100644 --- a/src/lib/ecore_evas/ecore_evas_ews.c +++ b/src/lib/ecore_evas/ecore_evas_ews.c @@ -715,7 +715,10 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func = NULL, // wm_rot_manual_rotation_done_set NULL, // wm_rot_manual_rotation_done - NULL // aux_hints_set + NULL, // aux_hints_set + + NULL, // fn_animator_register + NULL, // fn_animator_unregister }; void diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c index 6cc02b7..06f1ca8 100644 --- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c +++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c @@ -2072,7 +2072,10 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func = NULL, // wm_rot_manual_rotation_done_set NULL, // wm_rot_manual_rotation_done - NULL // aux_hints_set + NULL, // aux_hints_set + + NULL, // fn_animator_register + NULL, // fn_animator_unregister }; EAPI Ecore_Evas * --
[EGIT] [tools/enventor] master 01/01: Revert "fix the problem of selection cusor moving"
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=8aac906c8265c4f38e67d95edf358f0e78bcadce commit 8aac906c8265c4f38e67d95edf358f0e78bcadce Author: Hermet Park Date: Wed Feb 3 14:06:45 2016 +0900 Revert "fix the problem of selection cusor moving" This reverts commit e8ade4e64b154ed158b5f607807e06caca08a36d. This patch was not intended :( --- src/lib/edc_editor.c | 57 ++-- 1 file changed, 11 insertions(+), 46 deletions(-) diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c index 8522cf7..5dbe16a 100644 --- a/src/lib/edc_editor.c +++ b/src/lib/edc_editor.c @@ -114,7 +114,7 @@ visible_text_region_get(edit_data *ed, int *from_line, int *to_line) } static void -entry_recover(edit_data *ed, Edje_Object *en_edje, int cursor_pos, int sel_cur_begin, int sel_cur_end) +entry_recover(edit_data *ed, int cursor_pos) { elm_entry_calc_force(ed->en_edit); @@ -123,21 +123,14 @@ entry_recover(edit_data *ed, Edje_Object *en_edje, int cursor_pos, int sel_cur_b elm_entry_cursor_pos_set(ed->en_edit, cursor_pos); //not on selection mode - if (ed->select_pos != -1) - { -//recover selection region -const char *selected = elm_entry_selection_get(ed->en_edit); -if (!selected) return; -ed->on_select_recover = EINA_TRUE; -elm_entry_select_region_set(ed->en_edit, ed->select_pos, cursor_pos); -ed->on_select_recover = EINA_FALSE; - } + if (ed->select_pos == -1) return; - //recover selection cursor - edje_object_part_text_cursor_pos_set(en_edje, "elm.text", -EDJE_CURSOR_SELECTION_BEGIN, sel_cur_begin); - edje_object_part_text_cursor_pos_set(en_edje, "elm.text", -EDJE_CURSOR_SELECTION_END, sel_cur_end); + //recover selection region + const char *selected = elm_entry_selection_get(ed->en_edit); + if (!selected) return; + ed->on_select_recover = EINA_TRUE; + elm_entry_select_region_set(ed->en_edit, ed->select_pos, cursor_pos); + ed->on_select_recover = EINA_FALSE; } static void @@ -151,17 +144,7 @@ edit_font_apply(edit_data *ed, const char *font_name, const char *font_style) elm_entry_calc_force(ed->en_line); int pos = elm_entry_cursor_pos_get(ed->en_edit); - - Edje_Object *edje = elm_layout_edje_get(ed->en_edit); - if (elm_entry_scrollable_get(ed->en_edit)) - edje = edje_object_part_swallow_get(edje, "elm.swallow.content"); - - int sel_cur_begin = edje_object_part_text_cursor_pos_get - (edje, "elm.text", EDJE_CURSOR_SELECTION_BEGIN); - int sel_cur_end = edje_object_part_text_cursor_pos_get - (edje, "elm.text", EDJE_CURSOR_SELECTION_END); - - entry_recover(ed, edje, pos, sel_cur_begin, sel_cur_end); + entry_recover(ed, pos); } static void @@ -224,15 +207,6 @@ syntax_color_apply(edit_data *ed, Eina_Bool partial) char *text = (char *) evas_object_textblock_text_markup_get(tb); int pos = elm_entry_cursor_pos_get(ed->en_edit); - Edje_Object *edje = elm_layout_edje_get(ed->en_edit); - if (elm_entry_scrollable_get(ed->en_edit)) - edje = edje_object_part_swallow_get(edje, "elm.swallow.content"); - - int sel_cur_begin = edje_object_part_text_cursor_pos_get - (edje, "elm.text", EDJE_CURSOR_SELECTION_BEGIN); - int sel_cur_end = edje_object_part_text_cursor_pos_get -(edje, "elm.text", EDJE_CURSOR_SELECTION_END); - int from_line = 1; int to_line = -1; if (partial) visible_text_region_get(ed, &from_line, &to_line); @@ -254,7 +228,7 @@ syntax_color_apply(edit_data *ed, Eina_Bool partial) evas_object_textblock_text_markup_set(tb, translated); error_highlight(ed, tb); bracket_highlight(ed, tb); - entry_recover(ed, edje, pos, sel_cur_begin, sel_cur_end); + entry_recover(ed, pos); } static Eina_Bool @@ -300,21 +274,12 @@ syntax_color_thread_end_cb(void *data, Ecore_Thread *thread EINA_UNUSED) int pos = elm_entry_cursor_pos_get(td->ed->en_edit); Evas_Object *tb = elm_entry_textblock_get(td->ed->en_edit); - Edje_Object *edje = elm_layout_edje_get(td->ed->en_edit); - if (elm_entry_scrollable_get(td->ed->en_edit)) - edje = edje_object_part_swallow_get(edje, "elm.swallow.content"); - - int sel_cur_begin = edje_object_part_text_cursor_pos_get - (edje, "elm.text", EDJE_CURSOR_SELECTION_BEGIN); - int sel_cur_end = edje_object_part_text_cursor_pos_get - (edje, "elm.text", EDJE_CURSOR_SELECTION_END); - /* I'm not sure this will be problem. But it can avoid entry_object_text_escaped_set() in Edje. Logically that's unnecessary in this case. */ evas_object_textblock_text_markup_set(tb, td->translated); error_highlight(td->ed, tb); - entry_recover(td->ed, edje, pos, sel_cur_begin, sel_cur_end); + entry_recover(td->ed
[EGIT] [tools/enventor] master 02/02: Set focus to the editor when zooming popup is dismissed.
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=c610bebb8dcdfa0ad4618a7f648ce8e723768df7 commit c610bebb8dcdfa0ad4618a7f648ce8e723768df7 Author: Hermet Park Date: Wed Feb 3 14:04:41 2016 +0900 Set focus to the editor when zooming popup is dismissed. This fixed the after focus image of the zooming popup. --- src/bin/statusbar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/statusbar.c b/src/bin/statusbar.c index dd44626..d618429 100644 --- a/src/bin/statusbar.c +++ b/src/bin/statusbar.c @@ -43,6 +43,7 @@ ctxpopup_dismissed_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { stats_data *sd = data; + enventor_object_focus_set(base_enventor_get(), EINA_TRUE); evas_object_del(obj); sd->ctxpopup = NULL; } --
[EGIT] [tools/enventor] master 01/02: fix the problem of selection cusor moving
hermet pushed a commit to branch master. http://git.enlightenment.org/tools/enventor.git/commit/?id=e8ade4e64b154ed158b5f607807e06caca08a36d commit e8ade4e64b154ed158b5f607807e06caca08a36d Author: taehyub Date: Wed Feb 3 10:36:12 2016 +0900 fix the problem of selection cusor moving Summary: The selection cursor is moved at the frist When clicking and moving the bracket using the mouse. In entry_recover(), there is no selection cursor recover machanism. So I added the selection recover logic in the function. Now, it is fixed. @fix @T3099 Test Plan: 1. click the bracket 2. moving the cursor keeping the mouse clicking 3. see the fixed result Reviewers: Hermet, Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D3641 --- src/lib/edc_editor.c | 57 ++-- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c index 5dbe16a..8522cf7 100644 --- a/src/lib/edc_editor.c +++ b/src/lib/edc_editor.c @@ -114,7 +114,7 @@ visible_text_region_get(edit_data *ed, int *from_line, int *to_line) } static void -entry_recover(edit_data *ed, int cursor_pos) +entry_recover(edit_data *ed, Edje_Object *en_edje, int cursor_pos, int sel_cur_begin, int sel_cur_end) { elm_entry_calc_force(ed->en_edit); @@ -123,14 +123,21 @@ entry_recover(edit_data *ed, int cursor_pos) elm_entry_cursor_pos_set(ed->en_edit, cursor_pos); //not on selection mode - if (ed->select_pos == -1) return; + if (ed->select_pos != -1) + { +//recover selection region +const char *selected = elm_entry_selection_get(ed->en_edit); +if (!selected) return; +ed->on_select_recover = EINA_TRUE; +elm_entry_select_region_set(ed->en_edit, ed->select_pos, cursor_pos); +ed->on_select_recover = EINA_FALSE; + } - //recover selection region - const char *selected = elm_entry_selection_get(ed->en_edit); - if (!selected) return; - ed->on_select_recover = EINA_TRUE; - elm_entry_select_region_set(ed->en_edit, ed->select_pos, cursor_pos); - ed->on_select_recover = EINA_FALSE; + //recover selection cursor + edje_object_part_text_cursor_pos_set(en_edje, "elm.text", +EDJE_CURSOR_SELECTION_BEGIN, sel_cur_begin); + edje_object_part_text_cursor_pos_set(en_edje, "elm.text", +EDJE_CURSOR_SELECTION_END, sel_cur_end); } static void @@ -144,7 +151,17 @@ edit_font_apply(edit_data *ed, const char *font_name, const char *font_style) elm_entry_calc_force(ed->en_line); int pos = elm_entry_cursor_pos_get(ed->en_edit); - entry_recover(ed, pos); + + Edje_Object *edje = elm_layout_edje_get(ed->en_edit); + if (elm_entry_scrollable_get(ed->en_edit)) + edje = edje_object_part_swallow_get(edje, "elm.swallow.content"); + + int sel_cur_begin = edje_object_part_text_cursor_pos_get + (edje, "elm.text", EDJE_CURSOR_SELECTION_BEGIN); + int sel_cur_end = edje_object_part_text_cursor_pos_get + (edje, "elm.text", EDJE_CURSOR_SELECTION_END); + + entry_recover(ed, edje, pos, sel_cur_begin, sel_cur_end); } static void @@ -207,6 +224,15 @@ syntax_color_apply(edit_data *ed, Eina_Bool partial) char *text = (char *) evas_object_textblock_text_markup_get(tb); int pos = elm_entry_cursor_pos_get(ed->en_edit); + Edje_Object *edje = elm_layout_edje_get(ed->en_edit); + if (elm_entry_scrollable_get(ed->en_edit)) + edje = edje_object_part_swallow_get(edje, "elm.swallow.content"); + + int sel_cur_begin = edje_object_part_text_cursor_pos_get + (edje, "elm.text", EDJE_CURSOR_SELECTION_BEGIN); + int sel_cur_end = edje_object_part_text_cursor_pos_get +(edje, "elm.text", EDJE_CURSOR_SELECTION_END); + int from_line = 1; int to_line = -1; if (partial) visible_text_region_get(ed, &from_line, &to_line); @@ -228,7 +254,7 @@ syntax_color_apply(edit_data *ed, Eina_Bool partial) evas_object_textblock_text_markup_set(tb, translated); error_highlight(ed, tb); bracket_highlight(ed, tb); - entry_recover(ed, pos); + entry_recover(ed, edje, pos, sel_cur_begin, sel_cur_end); } static Eina_Bool @@ -274,12 +300,21 @@ syntax_color_thread_end_cb(void *data, Ecore_Thread *thread EINA_UNUSED) int pos = elm_entry_cursor_pos_get(td->ed->en_edit); Evas_Object *tb = elm_entry_textblock_get(td->ed->en_edit); + Edje_Object *edje = elm_layout_edje_get(td->ed->en_edit); + if (elm_entry_scrollable_get(td->ed->en_edit)) + edje = edje_object_part_swallow_get(edje, "elm.swallow.content"); + + int sel_cur_begin = edje_object_part_text_cursor_pos_get + (edje, "elm.text", EDJE_CURSOR_SELECTION_BEGIN); + int sel_cur_end = edje_object_part_text_cursor_pos_get + (edje, "elm.te
[EGIT] [apps/terminology] master 01/01: remove callbacks early when pty exists
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=bed1532e19aa2607ee85b5e69402bb7e52e64275 commit bed1532e19aa2607ee85b5e69402bb7e52e64275 Author: Boris Faure Date: Tue Feb 2 23:34:54 2016 +0100 remove callbacks early when pty exists --- src/bin/termio.c | 32 1 file changed, 32 insertions(+) diff --git a/src/bin/termio.c b/src/bin/termio.c index 704c363..3526b6e 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -5278,6 +5278,7 @@ _smart_del(Evas_Object *obj) _smart_cb_mouse_wheel); evas_object_del(sd->event); +sd->event = NULL; } if (sd->self) { @@ -5456,6 +5457,37 @@ _smart_pty_exited(void *data) Termio *sd = evas_object_smart_data_get(data); EINA_SAFETY_ON_NULL_RETURN(sd); + + if (sd->event) + { +evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_DOWN, + _smart_cb_mouse_down); +evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_UP, + _smart_cb_mouse_up); +evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_MOVE, + _smart_cb_mouse_move); +evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_IN, + _smart_cb_mouse_in); +evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_OUT, + _smart_cb_mouse_out); +evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_WHEEL, + _smart_cb_mouse_wheel); + +evas_object_del(sd->event); +sd->event = NULL; + } + if (sd->self) + { +evas_object_event_callback_del(sd->self, EVAS_CALLBACK_KEY_DOWN, + _smart_cb_key_down); +evas_object_event_callback_del(sd->self, EVAS_CALLBACK_KEY_UP, + _smart_cb_key_up); +evas_object_event_callback_del(sd->self, EVAS_CALLBACK_FOCUS_IN, + _smart_cb_focus_in); +evas_object_event_callback_del(sd->self, EVAS_CALLBACK_FOCUS_OUT, + _smart_cb_focus_out); + } + term_close(sd->win, sd->self, EINA_TRUE); } --
[EGIT] [apps/terminology] master 01/01: do not use edje cb when term quits. Closes T3105
billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=1100f4d9644f997e889ec82f1b2278851a5fbcb9 commit 1100f4d9644f997e889ec82f1b2278851a5fbcb9 Author: Boris Faure Date: Tue Feb 2 23:15:50 2016 +0100 do not use edje cb when term quits. Closes T3105 Also reorganize the code a bit --- src/bin/controls.c | 2 +- src/bin/main.h | 3 ++- src/bin/termio.c | 62 ++ src/bin/win.c | 48 -- 4 files changed, 33 insertions(+), 82 deletions(-) diff --git a/src/bin/controls.c b/src/bin/controls.c index 1640073..d75041a 100644 --- a/src/bin/controls.c +++ b/src/bin/controls.c @@ -94,7 +94,7 @@ _cb_ct_miniview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *even static void _cb_ct_close(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { - main_close(ct_win, ct_term); + term_close(ct_win, ct_term, EINA_FALSE); } static void diff --git a/src/bin/main.h b/src/bin/main.h index a378f92..61d387f 100644 --- a/src/bin/main.h +++ b/src/bin/main.h @@ -8,7 +8,8 @@ void main_new(Evas_Object *win, Evas_Object *term); void main_new_with_dir(Evas_Object *win, Evas_Object *term, const char *wdir); void main_split_h(Evas_Object *win, Evas_Object *term, char *cmd); void main_split_v(Evas_Object *win, Evas_Object *term, char *cmd); -void main_close(Evas_Object *win, Evas_Object *term); +void term_close(Evas_Object *win, Evas_Object *term, +Eina_Bool hold_if_requested); void main_trans_update(const Config *config); void main_media_update(const Config *config); diff --git a/src/bin/termio.c b/src/bin/termio.c index 57f99ea..704c363 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -275,25 +275,6 @@ _win_obj_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event EINA void -termio_win_set(Evas_Object *obj, Evas_Object *win) -{ - Termio *sd = evas_object_smart_data_get(obj); - EINA_SAFETY_ON_NULL_RETURN(sd); - if (sd->win) - { -evas_object_event_callback_del_full(sd->win, EVAS_CALLBACK_DEL, -_win_obj_del, obj); -sd->win = NULL; - } - if (win) - { -sd->win = win; -evas_object_event_callback_add(sd->win, EVAS_CALLBACK_DEL, - _win_obj_del, obj); - } -} - -void termio_theme_set(Evas_Object *obj, Evas_Object *theme) { Termio *sd = evas_object_smart_data_get(obj); @@ -5474,38 +5455,8 @@ _smart_pty_exited(void *data) { Termio *sd = evas_object_smart_data_get(data); - if (sd->event) - { -evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_DOWN, - _smart_cb_mouse_down); -evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_UP, - _smart_cb_mouse_up); -evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_MOVE, - _smart_cb_mouse_move); -evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_IN, - _smart_cb_mouse_in); -evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_OUT, - _smart_cb_mouse_out); -evas_object_event_callback_del(sd->event, EVAS_CALLBACK_MOUSE_WHEEL, - _smart_cb_mouse_wheel); - -evas_object_del(sd->event); -sd->event = NULL; - } - if (sd->self) - { -evas_object_event_callback_del(sd->self, EVAS_CALLBACK_KEY_DOWN, - _smart_cb_key_down); -evas_object_event_callback_del(sd->self, EVAS_CALLBACK_KEY_UP, - _smart_cb_key_up); -evas_object_event_callback_del(sd->self, EVAS_CALLBACK_FOCUS_IN, - _smart_cb_focus_in); -evas_object_event_callback_del(sd->self, EVAS_CALLBACK_FOCUS_OUT, - _smart_cb_focus_out); -sd->self = NULL; - } - - evas_object_smart_callback_call(data, "exited", NULL); + EINA_SAFETY_ON_NULL_RETURN(sd); + term_close(sd->win, sd->self, EINA_TRUE); } static void @@ -5906,7 +5857,7 @@ _smart_cb_drop(void *data, Evas_Object *o EINA_UNUSED, Elm_Selection_Data *ev) Evas_Object * -termio_add(Evas_Object *parent, Config *config, +termio_add(Evas_Object *win, Config *config, const char *cmd, Eina_Bool login_shell, const char *cd, int w, int h, Term *term) { @@ -5923,8 +5874,8 @@ termio_add(Evas_Object *parent, Config *config, }; char *mod = NULL; - EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - e = evas_object_evas_get(parent); + EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL); + e = evas_object_evas_get(win); if (!e) return NULL
[EGIT] [core/elementary] master 01/01: elementary: update mailmap addresses
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0e17e5c76c1b358d3aacaa7851d0427e1f37c980 commit 0e17e5c76c1b358d3aacaa7851d0427e1f37c980 Author: Chris Michael Date: Tue Feb 2 15:02:20 2016 -0500 elementary: update mailmap addresses Signed-off-by: Chris Michael --- .mailmap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.mailmap b/.mailmap index d9d6852..0bb03a3 100644 --- a/.mailmap +++ b/.mailmap @@ -17,10 +17,10 @@ Vincent Torri Vincent Torri Tom Hacohen Tom 'TAsn' Hacohen Tom Hacohen Tom Gustavo Sverzut Barbieri Gustavo Sverzut Barbieri -Christopher Michael Christopher Michael +Christopher Michael Christopher Michael Christopher Michael Christopher Michael -Christopher Michael Chris Michael -Christopher Michael Chris Michael +Christopher Michael Christopher Michael +Christopher Michael Christopher Michael Sebastian Dransfeld Sebastian Dransfeld Sebastian Dransfeld sebastid Mike Blumenkrantz Mike Blumenkrantz --
[EGIT] [core/efl] master 01/01: efl: Update mailmap addresses
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ea8686d776eddca8b5f9b42aa59fa641dc374e12 commit ea8686d776eddca8b5f9b42aa59fa641dc374e12 Author: Chris Michael Date: Tue Feb 2 15:01:58 2016 -0500 efl: Update mailmap addresses Signed-off-by: Chris Michael --- .mailmap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.mailmap b/.mailmap index d9d6852..0bb03a3 100644 --- a/.mailmap +++ b/.mailmap @@ -17,10 +17,10 @@ Vincent Torri Vincent Torri Tom Hacohen Tom 'TAsn' Hacohen Tom Hacohen Tom Gustavo Sverzut Barbieri Gustavo Sverzut Barbieri -Christopher Michael Christopher Michael +Christopher Michael Christopher Michael Christopher Michael Christopher Michael -Christopher Michael Chris Michael -Christopher Michael Chris Michael +Christopher Michael Christopher Michael +Christopher Michael Christopher Michael Sebastian Dransfeld Sebastian Dransfeld Sebastian Dransfeld sebastid Mike Blumenkrantz Mike Blumenkrantz --
[EGIT] [core/enlightenment] master 01/01: update mailmap addresses
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=35ade926241d0c92a059d082325ad3747a9e0324 commit 35ade926241d0c92a059d082325ad3747a9e0324 Author: Chris Michael Date: Tue Feb 2 15:02:12 2016 -0500 update mailmap addresses Signed-off-by: Chris Michael --- .mailmap | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index d055df3..0bb03a3 100644 --- a/.mailmap +++ b/.mailmap @@ -19,9 +19,8 @@ Tom Hacohen Tom Gustavo Sverzut Barbieri Gustavo Sverzut Barbieri Christopher Michael Christopher Michael Christopher Michael Christopher Michael -Christopher Michael Christopher Michael -Christopher Michael Christopher Michael Christopher Michael Christopher Michael +Christopher Michael Christopher Michael Sebastian Dransfeld Sebastian Dransfeld Sebastian Dransfeld sebastid Mike Blumenkrantz Mike Blumenkrantz --
[EGIT] [core/elementary] master 01/01: panel: no need for destructor anymore as the event handler will disappear in the destructor.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=7f3a9bf3c0eeaedcaf27dedf690da4533a9e96a8 commit 7f3a9bf3c0eeaedcaf27dedf690da4533a9e96a8 Author: Cedric BAIL Date: Tue Feb 2 11:39:10 2016 -0800 panel: no need for destructor anymore as the event handler will disappear in the destructor. --- src/lib/elm_panel.c | 9 - src/lib/elm_panel.eo | 1 - 2 files changed, 10 deletions(-) diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c index 17ed000..036df74 100644 --- a/src/lib/elm_panel.c +++ b/src/lib/elm_panel.c @@ -1186,15 +1186,6 @@ _elm_panel_eo_base_constructor(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED) } EOLIAN static void -_elm_panel_eo_base_destructor(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED) -{ - eo_do(obj, - eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _elm_panel_anim_cb, obj)); - - eo_do_super(obj, MY_CLASS, eo_destructor()); -} - -EOLIAN static void _elm_panel_orient_set(Eo *obj, Elm_Panel_Data *sd, Elm_Panel_Orient orient) { if (sd->orient == orient) return; diff --git a/src/lib/elm_panel.eo b/src/lib/elm_panel.eo index ffaca51..667834c 100644 --- a/src/lib/elm_panel.eo +++ b/src/lib/elm_panel.eo @@ -67,7 +67,6 @@ class Elm.Panel (Elm.Layout, Elm_Interface_Scrollable, implements { class.constructor; Eo.Base.constructor; - Eo.Base.destructor; Evas.Object_Smart.add; Evas.Object_Smart.member_add; Evas.Object_Smart.del; --
[EGIT] [bindings/python/python-efl] master 02/02: Elm.FileSelector: Fix ref leak
kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=1189e17fe0cd159190ebb6ae9b7a7f3dc9caee0b commit 1189e17fe0cd159190ebb6ae9b7a7f3dc9caee0b Author: Kai Huuhko Date: Tue Feb 2 21:41:37 2016 +0200 Elm.FileSelector: Fix ref leak --- efl/elementary/fileselector.pxi | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/efl/elementary/fileselector.pxi b/efl/elementary/fileselector.pxi index a861bfb..77ef2d7 100644 --- a/efl/elementary/fileselector.pxi +++ b/efl/elementary/fileselector.pxi @@ -34,6 +34,8 @@ cdef class Fileselector(LayoutClass): """ +cdef list _custom_filters + def __init__(self, evasObject parent, *args, **kwargs): """Fileselector(...) @@ -45,6 +47,7 @@ cdef class Fileselector(LayoutClass): """ self._set_obj(elm_fileselector_add(parent.obj)) self._set_properties_from_keyword_args(kwargs) +self._custom_filters = list() property is_save: """Enable/disable the file name entry box where the user can type @@ -351,9 +354,7 @@ cdef class Fileselector(LayoutClass): """ cb_data = (func, data) -# FIXME: This is now a ref leak. It should be stored somewhere and -#deleted in the remove method. -Py_INCREF(cb_data) +self._custom_filters.append(cb_data) if isinstance(filter_name, unicode): filter_name = PyUnicode_AsUTF8String(filter_name) elm_fileselector_custom_filter_append(self.obj, @@ -373,6 +374,7 @@ cdef class Fileselector(LayoutClass): .. versionadded:: 1.8 """ +del self._custom_filters[:] elm_fileselector_filters_clear(self.obj) property hidden_visible: --
[EGIT] [bindings/python/python-efl] master 01/02: Clean up cruft code
kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=fc987411daab68c60aa66c6ad3574426e3578ed4 commit fc987411daab68c60aa66c6ad3574426e3578ed4 Author: Kai Huuhko Date: Tue Feb 2 21:37:02 2016 +0200 Clean up cruft code --- efl/edje/efl.edje_external.pxi | 3 --- efl/elementary/label.pxi | 21 - 2 files changed, 24 deletions(-) diff --git a/efl/edje/efl.edje_external.pxi b/efl/edje/efl.edje_external.pxi index 174f43d..564c414 100644 --- a/efl/edje/efl.edje_external.pxi +++ b/efl/edje/efl.edje_external.pxi @@ -78,9 +78,6 @@ cdef ExternalParam ExternalParam_from_ptr(Edje_External_Param *param): p.obj = param return p -#def _ExternalParam_from_ptr(uintptr_t ptr): -#return ExternalParam_from_ptr(ptr) - cdef class ExternalParamInfo: property name: diff --git a/efl/elementary/label.pxi b/efl/elementary/label.pxi index 34cf742..3023e47 100644 --- a/efl/elementary/label.pxi +++ b/efl/elementary/label.pxi @@ -100,27 +100,6 @@ cdef class Label(LayoutClass): def ellipsis_get(self): return elm_label_ellipsis_get(self.obj) -# FIXME: Why was this commented out??? -# property slide: -# """ -# -# .. deprecated:: 1.8 -# Use :py:attr:`slide_mode` instead. -# -# """ -# def __get__(self): -# return self.slide_get() -# -# def __set__(self, slide): -# self.slide_set(True if slide else False) -# -# @DEPRECATED("1.8", "Use :py:attr:`slide_mode` instead.") -# def slide_set(self, bint slide): -# elm_label_slide_mode_set(self.obj, 2 if slide else 0) -# @DEPRECATED("1.8", "Use :py:attr:`slide_mode` instead.") -# def slide_get(self): -# return bool(elm_label_slide_mode_get(self.obj)) - property slide_duration: """The duration time in moving text from slide begin position to slide end position --
[EGIT] [core/enlightenment] enlightenment-0.20 43/59: determine new_client state for xwayland clients using xwayland pixmap
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9af96a4c23dedb74e191fc1caaa325250f424d24 commit 9af96a4c23dedb74e191fc1caaa325250f424d24 Author: Mike Blumenkrantz Date: Thu Jan 21 15:35:05 2016 -0500 determine new_client state for xwayland clients using xwayland pixmap in the case where the xwayland pixmap has previously been marked as usable, the corresponding client is guaranteed to have gone through the new_client eval. allowing a second eval will result in wrong geometries being set for the window in some cases --- src/bin/e_comp_wl.c | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index c48c6d3..9e9c1ad 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1024,6 +1024,10 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) int x = 0, y = 0, w, h; first = !e_pixmap_usable_get(ec->pixmap); +#ifndef HAVE_WAYLAND_ONLY + if (first && e_client_has_xwindow(ec)) + first = !e_pixmap_usable_get(e_comp_x_client_pixmap_get(ec)); +#endif ignored = ec->ignored; if (state->new_attach) --
[EGIT] [core/enlightenment] enlightenment-0.20 37/59: remove _e_comp_wl_focus_down_set()
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7ae3d943083536725dd0081a929140a2902875c6 commit 7ae3d943083536725dd0081a929140a2902875c6 Author: Mike Blumenkrantz Date: Wed Jan 20 17:02:21 2016 -0500 remove _e_comp_wl_focus_down_set() this function does nothing for wayland clients and never should have been used in this file --- src/bin/e_comp_wl.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index de44dce..b0d2948 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -55,16 +55,6 @@ _e_comp_wl_configure_send(E_Client *ec, Eina_Bool edges) } static void -_e_comp_wl_focus_down_set(E_Client *ec) -{ - Ecore_Window win = 0; - - win = e_client_util_pwin_get(ec); - e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win); - e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win); -} - -static void _e_comp_wl_focus_check(void) { E_Client *ec; --
[EGIT] [core/enlightenment] enlightenment-0.20 25/59: call xdg surface map when creating a surface for visible internal windows
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f63ebeb939205e4f70c235628d23e2f2b9728bfc commit f63ebeb939205e4f70c235628d23e2f2b9728bfc Author: Mike Blumenkrantz Date: Tue Jan 19 13:43:06 2016 -0500 call xdg surface map when creating a surface for visible internal windows if windows are created during startup, they will attempt to show themselves before xdg surface operations are available, leading to a scenario where they will never successfully map themselves. if the elm win object is visible, this indicates a mapped internal window, so directly call the map function at this time to make the window visible --- src/modules/wl_desktop_shell/e_mod_main.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index bb4020d..60279f4 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -1165,6 +1165,9 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour ec->border.changed = ec->changes.border = !ec->borderless; ec->netwm.type = E_WINDOW_TYPE_NORMAL; ec->comp_data->set_win_type = EINA_TRUE; + + if (ec->internal_elm_win && evas_object_visible_get(ec->internal_elm_win)) + _e_xdg_shell_surface_map(surface_resource); } static void @@ -1272,7 +1275,8 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource cdata->popup.x = x; cdata->popup.y = y; } - + if (ec->internal_elm_win && evas_object_visible_get(ec->internal_elm_win)) + _e_xdg_shell_surface_map(surface_resource); } static void --
[EGIT] [core/enlightenment] enlightenment-0.20 02/59: include header for Ecore_Wl2
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=01ac2a1a08f391eaf4bacf58f15d98d54e4943ad commit 01ac2a1a08f391eaf4bacf58f15d98d54e4943ad Author: Chris Michael Date: Thu Oct 22 11:54:35 2015 -0400 include header for Ecore_Wl2 Signed-off-by: Chris Michael --- src/bin/e.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e.h b/src/bin/e.h index 2dc2bd0..0993e65 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -127,7 +127,7 @@ void *alloca (size_t); # include # ifdef HAVE_WAYLAND -# include +# include # include # endif --
[EGIT] [core/enlightenment] enlightenment-0.20 23/59: Fix issue of using the wrong id when finding pixmap client
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=d37bcc887dc88e4a90d83bd8a7e72cae12ea7908 commit d37bcc887dc88e4a90d83bd8a7e72cae12ea7908 Author: Chris Michael Date: Tue Jan 19 10:46:03 2016 -0500 Fix issue of using the wrong id when finding pixmap client Previously, we were passing in the wl window id into the pixmap_find_client function. This is improper as the e_pixmap_new functions take the surface resource id. To solve this, we will get the Ecore_Wl2_window from the Evas_Object, fetch the surface id from that, then pass those into e_pixmap_find_client. This resolves an issue where the everything module was not working properly. ref T3058 Signed-off-by: Chris Michael --- src/bin/e_win.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/e_win.c b/src/bin/e_win.c index 266d43f..51c21a4 100644 --- a/src/bin/e_win.c +++ b/src/bin/e_win.c @@ -79,11 +79,13 @@ _e_elm_win_trap_show(void *data, Evas_Object *o) #ifdef HAVE_WAYLAND if (!strncmp(ecore_evas_engine_name_get(ee), "wayland", 7)) { + Ecore_Wl2_Window *ewin = elm_win_wl_window_get(o); + type = E_PIXMAP_TYPE_WL; ecore_evas_object_cursor_set(ee, NULL, 0, 0, 0); ctx->pointer = e_comp->pointer; elm_win_borderless_set(o, 1); - wl_win_id = win; + wl_win_id = ecore_wl2_window_surface_id_get(ewin); } else #endif --
[EGIT] [core/enlightenment] enlightenment-0.20 10/59: Port wl_fb module to use Ecore_Wl2 Library
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=5ea81d10fd07d523d1246aec06ff66a1efb22799 commit 5ea81d10fd07d523d1246aec06ff66a1efb22799 Author: Chris Michael Date: Mon Oct 26 10:11:54 2015 -0400 Port wl_fb module to use Ecore_Wl2 Library Signed-off-by: Chris Michael --- src/modules/wl_fb/e_mod_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/wl_fb/e_mod_main.c b/src/modules/wl_fb/e_mod_main.c index f7b5812..cfbdef2 100644 --- a/src/modules/wl_fb/e_mod_main.c +++ b/src/modules/wl_fb/e_mod_main.c @@ -1,6 +1,6 @@ #include "e.h" #include -#include +/* #include */ E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_FB" }; @@ -39,8 +39,8 @@ e_modapi_init(E_Module *m) e_comp_canvas_init(w, h); e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE); - ecore_wl_init(NULL); - ecore_wl_server_mode_set(1); + /* ecore_wl_init(NULL); */ + /* ecore_wl_server_mode_set(1); */ return m; } --
[EGIT] [editors/vim-configs] master 01/01: syntax/eo: support @hot
jayji pushed a commit to branch master. http://git.enlightenment.org/editors/vim-configs.git/commit/?id=538d4b0e54601a89244c3ea37bdc7451c6f4fdd9 commit 538d4b0e54601a89244c3ea37bdc7451c6f4fdd9 Author: Jean Guyomarc'h Date: Tue Feb 2 20:30:24 2016 +0100 syntax/eo: support @hot @hot was introduced in EFL by commit c95350016dd04ecd1bd514a73af862f36ae7f39e. --- syntax/eo.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/eo.vim b/syntax/eo.vim index 387d22f..1ffa42d 100644 --- a/syntax/eo.vim +++ b/syntax/eo.vim @@ -24,7 +24,7 @@ syn keywordeoStatements return " syn match className "\(\w\+\.\)\+\w\+" -syn match attributes "@\(inout\|out\|in\|property\|class\|free\|constructor\|extern\|beta\|protected\|const\|optional\|nullable\|warn_unused\|private\)" +syn match attributes "@\(inout\|out\|in\|property\|class\|free\|constructor\|extern\|beta\|protected\|const\|optional\|nullable\|warn_unused\|private\|hot\)" syn match eoLabelMatch "\w\+:" contains=eoClassBodyLabels syn match eoBlockOpener "\w\+\s*{" contains=eoClassBodyBlockOpener,eoInnerBlockOpener --
[EGIT] [core/enlightenment] enlightenment-0.20 47/59: disable binding activation when grab dialog, menus, or dnd is active
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7e3e2db2be72beb548a66983fa0e7b472b4c240e commit 7e3e2db2be72beb548a66983fa0e7b472b4c240e Author: Mike Blumenkrantz Date: Fri Jan 22 12:55:32 2016 -0500 disable binding activation when grab dialog, menus, or dnd is active these are all cases where bindings should fail to activate in order to avoid interfering with current operations also fixes an issue where attempting to add or modify an existing mouse/key/wheel binding would fail as a result of that binding activating while the grab dialog was active --- src/bin/e_dnd.c | 3 ++- src/bin/e_grab_dialog.c | 2 ++ src/bin/e_menu.c| 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c index b0e9fbd..53a229a 100644 --- a/src/bin/e_dnd.c +++ b/src/bin/e_dnd.c @@ -188,7 +188,7 @@ _e_drag_finalize(E_Drag *drag, E_Drag_Type type, int x, int y) } #endif } - + e_bindings_disabled_set(1); _drag_current = drag; return 1; } @@ -1158,6 +1158,7 @@ _e_drag_free(E_Drag *drag) #endif if (e_comp->comp_type == E_PIXMAP_TYPE_WL) e_comp_ungrab_input(1, 1); + e_bindings_disabled_set(0); _drag_win = 0; } diff --git a/src/bin/e_grab_dialog.c b/src/bin/e_grab_dialog.c index c00ac5f..37de7b4 100644 --- a/src/bin/e_grab_dialog.c +++ b/src/bin/e_grab_dialog.c @@ -80,6 +80,7 @@ _e_grab_dialog_free(E_Grab_Dialog *eg) e_comp_ungrab_input(1, 1); } E_FREE_LIST(eg->handlers, ecore_event_handler_del); + e_bindings_disabled_set(0); e_object_del(E_OBJECT(eg->dia)); free(eg); @@ -162,6 +163,7 @@ e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_ } e_dialog_show(eg->dia); evas_object_layer_set(e_win_client_get(eg->dia->win)->frame, E_LAYER_CLIENT_PRIO); + e_bindings_disabled_set(1); return eg; } diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c index 7a1dbde..cf686ca 100644 --- a/src/bin/e_menu.c +++ b/src/bin/e_menu.c @@ -1186,6 +1186,7 @@ e_menu_idler_before(void) { e_comp_ungrab_input(1, 1); _e_menu_win = 0; + e_bindings_disabled_set(0); } } } @@ -1880,6 +1881,7 @@ _e_menu_activate_internal(E_Menu *m, E_Zone *zone) _e_menu_win = 0; return; } +e_bindings_disabled_set(1); } m->zone = zone; if (!m->active) --
[EGIT] [core/enlightenment] enlightenment-0.20 42/59: allow instant client mouse actions to persist until mouse up
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=69ebda1df83e151c9d247bf3aef486aec2bef5bd commit 69ebda1df83e151c9d247bf3aef486aec2bef5bd Author: Mike Blumenkrantz Date: Thu Jan 21 14:43:52 2016 -0500 allow instant client mouse actions to persist until mouse up if an action triggers on a window, the triggering mouse event should not be passed to the window. the only way to determine this is if the action object lives through the entire event --- src/bin/e_client.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 9100f47..7235374 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -2859,11 +2859,7 @@ e_client_mouse_down(E_Client *ec, int button, Evas_Point *output, E_Binding_Even if (ec->cur_mouse_action) { did_act = EINA_TRUE; - if ((!ec->cur_mouse_action->func.end_mouse) && - (!ec->cur_mouse_action->func.end)) - ec->cur_mouse_action = NULL; - if (ec->cur_mouse_action) - e_object_ref(E_OBJECT(ec->cur_mouse_action)); + e_object_ref(E_OBJECT(ec->cur_mouse_action)); } } if ((!did_act) || (((pfocus == e_client_focused_get()) || (ec == e_client_focused_get())) && (ec->layer >= player))) --
[EGIT] [core/enlightenment] enlightenment-0.20 56/59: send mouse out+in on desk flip end
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=5864d4b9e65c18c4dc70ab5793eafdc7beb9ec1c commit 5864d4b9e65c18c4dc70ab5793eafdc7beb9ec1c Author: Mike Blumenkrantz Date: Sat Jan 30 11:22:21 2016 -0500 send mouse out+in on desk flip end this triggers mouse in events on objects under the mouse in order to forcibly reapply focus for mouse-based focus policies fix Tfrance --- src/bin/e_desk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index 77f157a..835e4c9 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -654,6 +654,11 @@ e_desk_flip_end(E_Desk *desk) _e_desk_event_desk_after_show_free, NULL); e_comp_shape_queue(); + if (e_comp->comp_type == E_PIXMAP_TYPE_X) + { +evas_event_feed_mouse_out(e_comp->evas, 0, NULL); +evas_event_feed_mouse_in(e_comp->evas, 0, NULL); + } if (!e_config->focus_last_focused_per_desktop) return; if ((e_config->focus_policy == E_FOCUS_MOUSE) || (e_config->focus_policy == E_FOCUS_SLOPPY)) --
[EGIT] [core/enlightenment] enlightenment-0.20 54/59: do not update keymap group in _e_comp_wl_input_keymap_update()
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=c111cf74558801d0a6e37c5bfa2379609219bf3c commit c111cf74558801d0a6e37c5bfa2379609219bf3c Author: Mike Blumenkrantz Date: Mon Jan 25 16:29:28 2016 -0500 do not update keymap group in _e_comp_wl_input_keymap_update() this state is dead, and any group changes which have been made should be reapplied based on the new state --- src/bin/e_comp_wl_input.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index e108973..90c7c1f 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -327,7 +327,7 @@ static void _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) { char *tmp; - xkb_mod_mask_t latched = 0, locked = 0, group = 0; + xkb_mod_mask_t latched = 0, locked = 0; struct wl_resource *res; Eina_List *l; @@ -349,18 +349,14 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) locked = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LOCKED); -group = - xkb_state_serialize_layout(e_comp_wl->xkb.state, - XKB_STATE_LAYOUT_EFFECTIVE); xkb_state_unref(e_comp_wl->xkb.state); } /* create a new xkb state */ e_comp_wl->xkb.state = xkb_state_new(keymap); - if ((latched) || (locked) || (group)) - xkb_state_update_mask(e_comp_wl->xkb.state, 0, - latched, locked, 0, 0, group); + xkb_state_update_mask(e_comp_wl->xkb.state, 0, + latched, locked, 0, 0, 0); /* increment keymap reference */ e_comp_wl->xkb.keymap = keymap; --
[EGIT] [core/enlightenment] enlightenment-0.20 45/59: allocate E_Shell_Data for all xdg surfaces (popups)
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=a28eae0ca9c80bdabd4bb1f4bd73a54da648d80c commit a28eae0ca9c80bdabd4bb1f4bd73a54da648d80c Author: Mike Blumenkrantz Date: Thu Jan 21 17:21:31 2016 -0500 allocate E_Shell_Data for all xdg surfaces (popups) this crashes if the shell surface does not have shell data --- src/modules/wl_desktop_shell/e_mod_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 1c9f7f6..a6245d8 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -1247,6 +1247,7 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource cdata->shell.ping = _e_xdg_shell_surface_ping; cdata->shell.map = _e_xdg_shell_surface_map; cdata->shell.unmap = _e_xdg_shell_surface_unmap; + cdata->shell.data = E_NEW(E_Shell_Data, 1); EC_CHANGED(ec); ec->new_client = ec->want_focus = ec->override = 1; --
[EGIT] [core/enlightenment] enlightenment-0.20 48/59: remove comp canvas key handler shortcuts for passing keys to wayland clients
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=e84ea043ac1494189b970b5b87c4d7efd5763069 commit e84ea043ac1494189b970b5b87c4d7efd5763069 Author: Mike Blumenkrantz Date: Fri Jan 22 13:13:08 2016 -0500 remove comp canvas key handler shortcuts for passing keys to wayland clients now handled normally by disabling bindings --- src/bin/e_comp_canvas.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c index 72a108b..a126d05 100644 --- a/src/bin/e_comp_canvas.c +++ b/src/bin/e_comp_canvas.c @@ -101,13 +101,6 @@ static Eina_Bool _e_comp_cb_key_down(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev) { e_screensaver_notidle(); - if (e_menu_grab_window_get()) - { -#ifdef HAVE_WAYLAND -e_comp_wl_key_down(ev); -#endif -return ECORE_CALLBACK_RENEW; - } if ((e_comp->comp_type == E_PIXMAP_TYPE_X) && (ev->event_window != e_comp->root)) { E_Client *ec; @@ -131,13 +124,6 @@ static Eina_Bool _e_comp_cb_key_up(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev) { e_screensaver_notidle(); - if (e_menu_grab_window_get()) - { -#ifdef HAVE_WAYLAND -e_comp_wl_key_up(ev); -#endif -return ECORE_CALLBACK_RENEW; - } if ((e_comp->comp_type == E_PIXMAP_TYPE_X) && (ev->event_window != e_comp->root)) return ECORE_CALLBACK_PASS_ON; return !e_bindings_key_up_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(e_comp), ev) #ifdef HAVE_WAYLAND --
[EGIT] [core/enlightenment] enlightenment-0.20 20/59: define EFL_BETA_API_SUPPORT explicitly in e.h if wayland support is enabled
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=5a917094cfedb11a23e52e3eb74f4733e23079ed commit 5a917094cfedb11a23e52e3eb74f4733e23079ed Author: Mike Blumenkrantz Date: Wed Jan 6 12:57:46 2016 -0500 define EFL_BETA_API_SUPPORT explicitly in e.h if wayland support is enabled --- src/bin/e.h | 4 1 file changed, 4 insertions(+) diff --git a/src/bin/e.h b/src/bin/e.h index 0993e65..6b7ea51 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -16,6 +16,10 @@ # include "config.h" # endif +#ifdef HAVE_WAYLAND +# define EFL_BETA_API_SUPPORT +#endif + # define USE_IPC # if 0 # define OBJECT_PARANOIA_CHECK --
[EGIT] [core/enlightenment] enlightenment-0.20 29/59: improve focus setting during wayland client show callback
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=62171ab39a83e015b9f0799fd45934a60e0edb54 commit 62171ab39a83e015b9f0799fd45934a60e0edb54 Author: Mike Blumenkrantz Date: Tue Jan 19 13:51:05 2016 -0500 improve focus setting during wayland client show callback take_focus will only be handled if the new_client flag is set. in all other casees, focus_set should be called directly new_client flag implies changed flag --- src/bin/e_comp_wl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 35394c5..0d8eacf 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -125,8 +125,10 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN if (!ec->ignored) { -ec->take_focus = !starting; -EC_CHANGED(ec); +if (ec->new_client) + ec->take_focus = !starting; +else + evas_object_focus_set(ec->frame, !starting); } EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) --
[EGIT] [core/enlightenment] enlightenment-0.20 52/59: do not shortcut access of Efreet_Desktop->x hash in fileman
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=820a70e71d8386a14dc6dc5f2c46f02f31f36744 commit 820a70e71d8386a14dc6dc5f2c46f02f31f36744 Author: Mike Blumenkrantz Date: Mon Jan 25 11:29:55 2016 -0500 do not shortcut access of Efreet_Desktop->x hash in fileman this subverts thread safety and also (now) avoids return data validation fix T3096 --- src/modules/fileman/e_fwin.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/modules/fileman/e_fwin.c b/src/modules/fileman/e_fwin.c index 5087cdd..f6cf55f 100644 --- a/src/modules/fileman/e_fwin.c +++ b/src/modules/fileman/e_fwin.c @@ -1147,7 +1147,7 @@ _e_fwin_custom_file_path_eval(E_Fwin *fwin, const char *res, *ret = NULL; /* get a X-something custom tage from the .desktop for the dir */ - res = eina_hash_find(ef->x, key); + res = efreet_desktop_x_field_get(ef, key); /* free the old path */ if (prev_path) eina_stringshare_del(prev_path); /* if there was no key found - return NULL */ @@ -1155,14 +1155,12 @@ _e_fwin_custom_file_path_eval(E_Fwin *fwin, /* it's a full path */ if (res[0] == '/') - ret = eina_stringshare_add(res); + return res; /* relative path to the dir */ - else - { -snprintf(buf, sizeof(buf), "%s/%s", - e_fm2_real_path_get(fwin->cur_page->fm_obj), res); -ret = eina_stringshare_add(buf); - } + snprintf(buf, sizeof(buf), "%s/%s", +e_fm2_real_path_get(fwin->cur_page->fm_obj), res); + ret = eina_stringshare_add(buf); + eina_stringshare_del(res); return ret; } --
[EGIT] [core/enlightenment] enlightenment-0.20 28/59: more correctly handle evry mouse detection on wayland
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=da2af2de23420c87cb1b06bef2cf725bef9be0f3 commit da2af2de23420c87cb1b06bef2cf725bef9be0f3 Author: Mike Blumenkrantz Date: Tue Jan 19 13:49:10 2016 -0500 more correctly handle evry mouse detection on wayland in this case, mouse events which are not originating from the internal window are for the screen, and these coords can be used for determining "mouse out". if the mouse event comes from the window, it is inside the window. ref 7c661b54a94351717201ac18f4c79a44a3207320 --- src/modules/everything/evry.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c index 959f776..eed3f8c 100644 --- a/src/modules/everything/evry.c +++ b/src/modules/everything/evry.c @@ -890,7 +890,7 @@ _evry_cb_mouse(void *data, int type, void *event) if (!win->grab) return ECORE_CALLBACK_PASS_ON; - if ((win->grab && (ev->event_window != ecore_evas_window_get(e_comp->ee))) && + if ((ev->event_window != ecore_evas_window_get(e_comp->ee)) && (ev->event_window != elm_win_window_id_get(win->ewin))) return ECORE_CALLBACK_PASS_ON; @@ -954,12 +954,20 @@ _evry_cb_mouse(void *data, int type, void *event) { win->mouse_out = 0; -if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x), - e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h)) +if (e_comp->comp_type == E_PIXMAP_TYPE_WL) { - win->mouse_out = 1; - return ECORE_CALLBACK_PASS_ON; + if (ev->event_window == ecore_evas_window_get(e_comp->ee)) + { + if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x), + e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h)) +win->mouse_out = 1; + } } +else if (!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x), + e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h)) + win->mouse_out = 1; +if (win->mouse_out) + return ECORE_CALLBACK_PASS_ON; win->mouse_button = ev->buttons; } @@ -967,9 +975,7 @@ _evry_cb_mouse(void *data, int type, void *event) { win->mouse_button = 0; -if (win->mouse_out && -(!E_INSIDE(e_comp_canvas_x_root_adjust(ev->root.x), - e_comp_canvas_y_root_adjust(ev->root.y), x, y, w, h))) +if (win->mouse_out) { evry_hide(win, 0); return ECORE_CALLBACK_PASS_ON; --
[EGIT] [core/enlightenment] enlightenment-0.20 58/59: 20.4 release
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=652a36e3c891d0aa1f97b6f4ab65f26d12e43ec7 commit 652a36e3c891d0aa1f97b6f4ab65f26d12e43ec7 Author: Mike Blumenkrantz Date: Tue Feb 2 13:46:36 2016 -0500 20.4 release --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ccaf87e..eb29d43 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,11 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [0]) m4_define([v_min], [20]) -m4_define([v_mic], [3]) +m4_define([v_mic], [4]) m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl ##-- When released, remove the dnl on the below line m4_undefine([v_rev]) -m4_define([relname], [0.20.3]) +m4_define([relname], [0.20.4]) ##-- When doing snapshots - change soname. remove dnl on below line m4_define([relname], [ver-autocannoli-0.20]) dnl m4_define([v_rel], [-release relname]) --
[EGIT] [core/enlightenment] enlightenment-0.20 05/59: port e_scale to use Ecore_Wl2
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=b8a7b2b93fc79082d02b3a4c240f0590482c6166 commit b8a7b2b93fc79082d02b3a4c240f0590482c6166 Author: Chris Michael Date: Thu Oct 22 11:55:51 2015 -0400 port e_scale to use Ecore_Wl2 Signed-off-by: Chris Michael --- src/bin/e_scale.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/e_scale.c b/src/bin/e_scale.c index 9c13dec..0a3948b 100644 --- a/src/bin/e_scale.c +++ b/src/bin/e_scale.c @@ -27,8 +27,12 @@ e_scale_update(void) e_scale = (double)ecore_x_dpi_get() / (double)e_config->scale.base_dpi; #endif #ifdef HAVE_WAYLAND +/* FIXME: This needs to get the DPI from a given output */ if (e_comp->comp_type == E_PIXMAP_TYPE_WL) - e_scale = (double)ecore_wl_dpi_get() / (double)e_config->scale.base_dpi; + { + e_scale = (double)ecore_wl2_output_dpi_get(NULL) / + (double)e_config->scale.base_dpi; + } #endif if (e_scale > e_config->scale.max) e_scale = e_config->scale.max; else if (e_scale < e_config->scale.min) --
[EGIT] [core/enlightenment] enlightenment-0.20 55/59: update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f4179c1b270df8c0e5a8b369d7461be168f28b46 commit f4179c1b270df8c0e5a8b369d7461be168f28b46 Author: Mike Blumenkrantz Date: Mon Jan 25 16:31:11 2016 -0500 update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input according to xkbcommon, the group returned from serializing the EFFECTIVE layout is the one which is currently active. this array index should match up with the list used in the xkb part of E_Config --- src/bin/e_comp_wl_input.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 90c7c1f..44ec56f 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -516,6 +516,11 @@ e_comp_wl_input_keyboard_modifiers_serialize(void) grp = xkb_state_serialize_layout(e_comp_wl->xkb.state, XKB_STATE_LAYOUT_EFFECTIVE); + if (grp != e_comp_wl->kbd.mod_group) + { +e_config->xkb.cur_group = grp; +ecore_event_add(E_EVENT_XKB_CHANGED, NULL, NULL, NULL); + } changed |= grp != e_comp_wl->kbd.mod_group; e_comp_wl->kbd.mod_group = grp; return changed; --
[EGIT] [core/enlightenment] enlightenment-0.20 31/59: automatically mark wayland cursor surfaces as visible during set_cursor
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=317f0794d62f030f6fb4e74e11b958cf15df47c7 commit 317f0794d62f030f6fb4e74e11b958cf15df47c7 Author: Mike Blumenkrantz Date: Wed Jan 20 15:55:10 2016 -0500 automatically mark wayland cursor surfaces as visible during set_cursor a cursor client should be shown/hidden as needed despite its lack of a shell interface, and having a special flag to identify these types of surfaces makes it easier to do that --- src/bin/e_comp_wl.c | 8 src/bin/e_comp_wl.h | 1 + src/bin/e_comp_wl_input.c | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index a7dc24d..09ec7a4 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1070,7 +1070,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -1084,7 +1084,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_TRUE; ec->ignored = 0; @@ -2758,7 +2758,7 @@ e_comp_wl_surface_commit(E_Client *ec) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -2772,7 +2772,7 @@ e_comp_wl_surface_commit(E_Client *ec) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) { ec->visible = EINA_TRUE; ec->ignored = 0; diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index a4426e1..d280eb3 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -300,6 +300,7 @@ struct _E_Comp_Wl_Client_Data Eina_Bool set_win_type : 1; Eina_Bool frame_update : 1; Eina_Bool maximize_pre : 1; + Eina_Bool cursor : 1; }; struct _E_Comp_Wl_Output diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index ec9d2e1..b07ad76 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -55,12 +55,14 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou ec = wl_resource_get_user_data(surface_resource); if (!ec->re_manage) { -ec->re_manage = 1; +ec->comp_data->cursor = ec->re_manage = 1; ec->ignored = 0; ec->lock_focus_out = ec->layer_block = ec->visible = ec->override = 1; ec->icccm.title = eina_stringshare_add("noshadow"); evas_object_pass_events_set(ec->frame, 1); +evas_object_show(ec->frame); +ec->comp_data->mapped = 1; e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); EC_CHANGED(ec); } --
[EGIT] [core/enlightenment] enlightenment-0.20 04/59: port wayland compositor to use Ecore_Wl2
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=824003eb1d85fd6ec0795a7b0997fe4b29afe1e1 commit 824003eb1d85fd6ec0795a7b0997fe4b29afe1e1 Author: Chris Michael Date: Thu Oct 22 11:55:27 2015 -0400 port wayland compositor to use Ecore_Wl2 Signed-off-by: Chris Michael --- src/bin/e_comp_wl.c | 103 +++- 1 file changed, 38 insertions(+), 65 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 0796d3a..de5eb6e 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -14,6 +14,8 @@ #endif E_API int E_EVENT_WAYLAND_GLOBAL_ADD = -1; +E_API Ecore_Wl2_Display *ewd = NULL; + #include "session-recovery-server-protocol.h" #ifndef EGL_HEIGHT @@ -74,27 +76,11 @@ _e_comp_wl_focus_check(void) e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE); } -static void -_e_comp_wl_log_cb_print(const char *format, va_list args) -{ - EINA_LOG_DOM_INFO(e_log_dom, format, args); -} - -static Eina_Bool -_e_comp_wl_cb_read(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED) -{ - /* dispatch pending wayland events */ - wl_event_loop_dispatch(e_comp_wl->wl.loop, 0); - - return ECORE_CALLBACK_RENEW; -} - -static void -_e_comp_wl_cb_prepare(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED) -{ - /* flush pending client events */ - wl_display_flush_clients(e_comp_wl->wl.disp); -} +/* static void */ +/* _e_comp_wl_log_cb_print(const char *format, va_list args) */ +/* { */ +/*EINA_LOG_DOM_INFO(e_log_dom, format, args); */ +/* } */ static Eina_Bool _e_comp_wl_cb_module_idle(void *data EINA_UNUSED) @@ -1676,7 +1662,7 @@ _e_comp_wl_compositor_cb_del(void *data EINA_UNUSED) } /* delete fd handler */ - if (e_comp_wl->fd_hdlr) ecore_main_fd_handler_del(e_comp_wl->fd_hdlr); + /* if (e_comp_wl->fd_hdlr) ecore_main_fd_handler_del(e_comp_wl->fd_hdlr); */ /* free allocated data structure */ free(e_comp_wl); @@ -2537,8 +2523,6 @@ static Eina_Bool _e_comp_wl_compositor_create(void) { E_Comp_Wl_Data *cdata; - const char *name; - int fd = 0; /* check for existing compositor. create if needed */ if (e_comp->comp_type == E_PIXMAP_TYPE_NONE) @@ -2555,24 +2539,25 @@ _e_comp_wl_compositor_create(void) e_comp_wl = e_comp->wl_comp_data = cdata; /* set wayland log handler */ - wl_log_set_handler_server(_e_comp_wl_log_cb_print); + /* wl_log_set_handler_server(_e_comp_wl_log_cb_print); */ - /* try to create a wayland display */ - if (!(cdata->wl.disp = wl_display_create())) + /* try to create an ecore_wl2 display */ + ewd = ecore_wl2_display_create(NULL); + if (!ewd) { ERR("Could not create a Wayland display: %m"); -goto disp_err; +free(cdata); +return EINA_FALSE; } - /* try to setup wayland socket */ - if (!(name = wl_display_add_socket_auto(cdata->wl.disp))) + cdata->wl.disp = ecore_wl2_display_get(ewd); + if (!cdata->wl.disp) { -ERR("Could not create Wayland display socket: %m"); -goto sock_err; +ERR("Could not create a Wayland display: %m"); +goto disp_err; } - /* set wayland display environment variable */ - e_env_set("WAYLAND_DISPLAY", name); + /* e_env_set("WAYLAND_DISPLAY", name); */ /* initialize compositor signals */ wl_signal_init(&cdata->signals.surface.create); @@ -2674,19 +2659,6 @@ _e_comp_wl_compositor_create(void) } #endif - /* get the wayland display loop */ - cdata->wl.loop = wl_display_get_event_loop(cdata->wl.disp); - - /* get the file descriptor of the wayland event loop */ - fd = wl_event_loop_get_fd(cdata->wl.loop); - - /* create a listener for wayland main loop events */ - cdata->fd_hdlr = - ecore_main_fd_handler_add(fd, (ECORE_FD_READ | ECORE_FD_ERROR), - _e_comp_wl_cb_read, cdata, NULL, NULL); - ecore_main_fd_handler_prepare_callback_set(cdata->fd_hdlr, - _e_comp_wl_cb_prepare, cdata); - /* setup module idler to load shell mmodule */ ecore_idler_add(_e_comp_wl_cb_module_idle, cdata); @@ -2703,9 +2675,9 @@ input_err: e_comp_wl_data_manager_shutdown(); data_err: comp_global_err: - e_env_unset("WAYLAND_DISPLAY"); -sock_err: - wl_display_destroy(cdata->wl.disp); + /* e_env_unset("WAYLAND_DISPLAY"); */ +/* sock_err: */ + ecore_wl2_display_destroy(ewd); disp_err: free(cdata); return EINA_FALSE; @@ -2775,12 +2747,10 @@ e_comp_wl_init(void) return EINA_FALSE; } - ecore_wl_server_mode_set(1); - /* try to init ecore_wayland */ - if (!ecore_wl_init(NULL)) + if (!ecore_wl2_init()) { -e_error_message_show(_("Enlightenment cannot initialize Ecore_Wayland!\n")); +e_error_message_show(_("Enlightenment cannot initialize Ecore_Wl2!\n")); return EINA_FALSE;
[EGIT] [core/enlightenment] enlightenment-0.20 27/59: only do passthrough surface map on xwayland surfaces during commit
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=76d7824a7c825efc2a96eca5e61c16a079ff1156 commit 76d7824a7c825efc2a96eca5e61c16a079ff1156 Author: Mike Blumenkrantz Date: Tue Jan 19 13:46:29 2016 -0500 only do passthrough surface map on xwayland surfaces during commit these was a workaround for handling early internal windows which is no longer necessary now that they will handle their map states more effectively now, any wayland surface (not xwayland) requires a shell to map the surface as intended --- src/bin/e_comp_wl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index a464af9..35394c5 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1068,7 +1068,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else + else if (e_client_has_xwindow(ec)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -1082,7 +1082,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else + else if (e_client_has_xwindow(ec)) { ec->visible = EINA_TRUE; ec->ignored = 0; @@ -2756,7 +2756,7 @@ e_comp_wl_surface_commit(E_Client *ec) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else + else if (e_client_has_xwindow(ec)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -2770,7 +2770,7 @@ e_comp_wl_surface_commit(E_Client *ec) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else + else if (e_client_has_xwindow(ec)) { ec->visible = EINA_TRUE; ec->ignored = 0; --
[EGIT] [core/enlightenment] enlightenment-0.20 01/59: Make configure check for Ecore_Wl2 library
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=157bee79ffad830d6c9dcb2359adf1ae4a02f4b9 commit 157bee79ffad830d6c9dcb2359adf1ae4a02f4b9 Author: Chris Michael Date: Thu Oct 22 11:53:55 2015 -0400 Make configure check for Ecore_Wl2 library Signed-off-by: Chris Michael --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 62d2531..ccaf87e 100644 --- a/configure.ac +++ b/configure.ac @@ -742,7 +742,7 @@ AC_MSG_CHECKING([whether wayland EGL support is enabled]) AC_MSG_RESULT([${e_cv_want_wayland_egl}]) if test "x${e_cv_want_wayland_only}" != "xno" ;then - PKG_CHECK_MODULES([WAYLAND], [ecore-wayland >= 1.16 wayland-server >= 1.8.0 wayland-client >= 1.8.0 xkbcommon uuid], + PKG_CHECK_MODULES([WAYLAND], [ecore-wl2 wayland-server >= 1.8.0 wayland-client >= 1.8.0 xkbcommon uuid], [ have_wayland=yes AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support]) @@ -859,7 +859,7 @@ WL_WEEKEYBOARD=false define([CHECK_MODULE_WL_WEEKEYBOARD], [ if test "x${have_wayland}" = "xyes" ; then - AC_E_CHECK_PKG(WL_WEEKEYBOARD, [ eina >= 1.8.0 evas >= 1.8.0 ecore >= 1.8.0 ecore-evas >= 1.8.0 ecore-wayland >= 1.8.0 edje >= 1.8.0 ], [WL_WEEKEYBOARD=true], [WL_WEEKEYBOARD=false]) + AC_E_CHECK_PKG(WL_WEEKEYBOARD, [ eina >= 1.8.0 evas >= 1.8.0 ecore >= 1.8.0 ecore-evas >= 1.8.0 ecore-wl2 >= 1.8.0 edje >= 1.8.0 ], [WL_WEEKEYBOARD=true], [WL_WEEKEYBOARD=false]) else WL_WEEKEYBOARD=false fi --
[EGIT] [core/enlightenment] enlightenment-0.20 35/59: add render updates for cursor clients if damages exist during set_cursor
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=8ddc98d3a7865b66957bb0c74924b1eb1e0a942b commit 8ddc98d3a7865b66957bb0c74924b1eb1e0a942b Author: Mike Blumenkrantz Date: Wed Jan 20 16:23:02 2016 -0500 add render updates for cursor clients if damages exist during set_cursor this indicates a cursor surface which has been committed but could not be rendered due to lack of shell interface and cursor hint --- src/bin/e_comp_wl_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index b07ad76..e108973 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -62,6 +62,8 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou ec->icccm.title = eina_stringshare_add("noshadow"); evas_object_pass_events_set(ec->frame, 1); evas_object_show(ec->frame); +if (e_comp_object_damage_exists(ec->frame)) + e_comp_object_render_update_add(ec->frame); ec->comp_data->mapped = 1; e_client_focus_stack_set(eina_list_remove(e_client_focus_stack_get(), ec)); EC_CHANGED(ec); --
[EGIT] [core/enlightenment] enlightenment-0.20 41/59: unify client mouse action ending
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f4c3d3eae80ca92fc445904fc2f6c11d6e295c6e commit f4c3d3eae80ca92fc445904fc2f6c11d6e295c6e Author: Mike Blumenkrantz Date: Thu Jan 21 14:29:10 2016 -0500 unify client mouse action ending the code for this in most places was identical, but in some places it was not, leading to behavior inconsistencies and potentially dangling objects --- src/bin/e_client.c | 49 - 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 28191e9..9100f47 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -413,6 +413,17 @@ _e_client_action_finish(void) } static void +_e_client_mouse_action_end(E_Client *ec) +{ + if (!ec->cur_mouse_action) return; + if (ec->cur_mouse_action->func.end_mouse) + ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL); + else if (ec->cur_mouse_action->func.end) + ec->cur_mouse_action->func.end(E_OBJECT(ec), ""); + E_FREE_FUNC(ec->cur_mouse_action, e_object_unref); +} + +static void _e_client_revert_focus(E_Client *ec) { E_Client *pec; @@ -586,11 +597,7 @@ _e_client_del(E_Client *ec) ec->exe_inst = NULL; } - if (ec->cur_mouse_action) - { -if (ec->cur_mouse_action->func.end) - ec->cur_mouse_action->func.end(E_OBJECT(ec), ""); - } + _e_client_mouse_action_end(ec); if (action_client == ec) _e_client_action_finish(); e_pointer_type_pop(e_comp->pointer, ec, NULL); @@ -1388,14 +1395,7 @@ _e_client_cb_evas_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN if (stopping) return; //ignore all of this if we're shutting down! if (e_object_is_del(data)) return; //client is about to die - if (ec->cur_mouse_action) - { -if (ec->cur_mouse_action->func.end_mouse) - ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL); -else if (ec->cur_mouse_action->func.end) - ec->cur_mouse_action->func.end(E_OBJECT(ec), ""); -E_FREE_FUNC(ec->cur_mouse_action, e_object_unref); - } + _e_client_mouse_action_end(ec); if (action_client == ec) _e_client_action_finish(); e_pointer_type_pop(e_comp->pointer, ec, NULL); @@ -2905,14 +2905,7 @@ e_client_mouse_up(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_ /* also we don't pass the same params that went in - then again that */ /* should be ok as we are just ending the action if it has an end */ if (ec->cur_mouse_action) - { -if (ec->cur_mouse_action->func.end_mouse) - ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", ev); -else if (ec->cur_mouse_action->func.end) - ec->cur_mouse_action->func.end(E_OBJECT(ec), ""); -e_object_unref(E_OBJECT(ec->cur_mouse_action)); -ec->cur_mouse_action = NULL; - } + _e_client_mouse_action_end(ec); else { if (!e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_WINDOW, E_OBJECT(ec), ev)) @@ -4587,12 +4580,7 @@ e_client_move_cancel(void) ec = ecmove; e_object_ref(E_OBJECT(ec)); -if (ec->cur_mouse_action->func.end_mouse) - ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL); -else if (ec->cur_mouse_action->func.end) - ec->cur_mouse_action->func.end(E_OBJECT(ec), ""); -e_object_unref(E_OBJECT(ec->cur_mouse_action)); -ec->cur_mouse_action = NULL; +_e_client_mouse_action_end(ec); e_object_unref(E_OBJECT(ec)); } else @@ -4609,12 +4597,7 @@ e_client_resize_cancel(void) ec = ecresize; e_object_ref(E_OBJECT(ec)); -if (ec->cur_mouse_action->func.end_mouse) - ec->cur_mouse_action->func.end_mouse(E_OBJECT(ec), "", NULL); -else if (ec->cur_mouse_action->func.end) - ec->cur_mouse_action->func.end(E_OBJECT(ec), ""); -e_object_unref(E_OBJECT(ec->cur_mouse_action)); -ec->cur_mouse_action = NULL; +_e_client_mouse_action_end(ec); e_object_unref(E_OBJECT(ec)); } else --
[EGIT] [core/enlightenment] enlightenment-0.20 46/59: add function for disabling mouse/key/wheel/signal bindings
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9c22c5d12ac4108fb977214341d96d06e0aa921a commit 9c22c5d12ac4108fb977214341d96d06e0aa921a Author: Mike Blumenkrantz Date: Fri Jan 22 12:41:43 2016 -0500 add function for disabling mouse/key/wheel/signal bindings currently there are a lot of workarounds for inhibiting these bindings, but it's getting harder to keep track of all the conditions and cases where bindings need to be worked around this should greatly simplify the process of toggling binding activation in cases where such behavior is undesirable acpi bindings are always allowed since they are unlikely to interfere with operations where direct-input bindings would be harmful --- src/bin/e_bindings.c | 46 ++ src/bin/e_bindings.h | 2 ++ 2 files changed, 48 insertions(+) diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c index fffb68a..1360529 100644 --- a/src/bin/e_bindings.c +++ b/src/bin/e_bindings.c @@ -20,6 +20,8 @@ static Eina_List *signal_bindings = NULL; static Eina_List *wheel_bindings = NULL; static Eina_List *acpi_bindings = NULL; +static unsigned int bindings_disabled = 0; + typedef struct _E_Binding_Edge_Data E_Binding_Edge_Data; struct _E_Binding_Edge_Data @@ -447,6 +449,7 @@ e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Bind E_Action *act; E_Binding_Mouse *binding; + if (bindings_disabled) return NULL; act = e_bindings_mouse_button_find(ctxt, ev, &binding); if (act) { @@ -485,6 +488,7 @@ e_bindings_mouse_up_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Bindin E_Action *act; E_Binding_Mouse *binding; + if (bindings_disabled) return NULL; act = e_bindings_mouse_button_find(ctxt, ev, &binding); if (act) { @@ -643,6 +647,7 @@ e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Ev E_Binding_Key *binding; Eina_List *l; + if (bindings_disabled) return NULL; mod = _e_bindings_modifiers(ev->modifiers); EINA_LIST_FOREACH(key_bindings, l, binding) { @@ -676,6 +681,7 @@ e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Even E_Binding_Key *binding; Eina_List *l; + if (bindings_disabled) return NULL; mod = _e_bindings_modifiers(ev->modifiers); EINA_LIST_FOREACH(key_bindings, l, binding) { @@ -894,6 +900,7 @@ e_bindings_edge_in_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z E_Action *act = NULL; Eina_List *l; + if (bindings_disabled) return NULL; current = e_desk_at_xy_get(ev->zone, ev->zone->desk_x_current, ev->zone->desk_y_current); if (current->fullscreen_clients && (!e_config->fullscreen_flip)) return NULL; @@ -943,6 +950,7 @@ e_bindings_edge_out_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_ E_Action *act = NULL; Eina_List *l; + if (bindings_disabled) return NULL; if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; @@ -986,6 +994,7 @@ e_bindings_edge_down_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event E_Action *act = NULL; Eina_List *l; + if (bindings_disabled) return NULL; current = e_desk_at_xy_get(ev->zone, ev->zone->desk_x_current, ev->zone->desk_y_current); if (current->fullscreen_clients && (!e_config->fullscreen_flip)) return NULL; @@ -1022,6 +1031,7 @@ e_bindings_edge_up_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Z E_Action *act = NULL; Eina_List *l; + if (bindings_disabled) return NULL; if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; @@ -1121,6 +1131,7 @@ e_bindings_signal_handle(E_Binding_Context ctxt, E_Object *obj, const char *sig, E_Action *act; E_Binding_Signal *binding; + if (bindings_disabled) return NULL; if ((!sig) || (sig && (sig[0] == 0))) return NULL; if (src && (src[0] == 0)) src = NULL; @@ -1285,6 +1296,7 @@ e_bindings_wheel_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Binding_E E_Action *act; E_Binding_Wheel *binding; + if (bindings_disabled) return NULL; act = e_bindings_wheel_find(ctxt, ev, &binding); if (act) { @@ -1400,6 +1412,40 @@ e_bindings_acpi_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Acpi return act; } +E_API void +e_bindings_disabled_set(Eina_Bool disabled) +{ + E_Client *ec; + Ecore_Window win; + + if (disabled) + { +if ((!bindings_disabled) && (e_comp->
[EGIT] [core/enlightenment] annotated tag v0.20.4 created (now dbb6cd6)
This is an automated email from the git hooks/post-receive script. discomfitor pushed a change to annotated tag v0.20.4 in repository core/enlightenment. at dbb6cd6 (tag) tagging f3b9d9a9c61ad2cbb4c5e33885cacef3941144c6 (commit) replaces v0.20.3 tagged by Mike Blumenkrantz on Tue Feb 2 13:48:20 2016 -0500 - Log - 0.20.4 release Chris Michael (19): Make configure check for Ecore_Wl2 library include header for Ecore_Wl2 remove unused event loop and add external Ecore_Wl2_Display variable port wayland compositor to use Ecore_Wl2 port e_scale to use Ecore_Wl2 Port shot module to use ecore_wl2 library Fix formatting of wl_weekeyboard module Don't leak eina_iterator in shot module Port wl_weekeyboard to use Ecore_Wl2 library Port wl_fb module to use Ecore_Wl2 Library Fix formatting Fix formatting Try to init (and error check the init) of ecore_wl2 library before we Fix using global ewd variable by making it part of e_comp_wl Fix type of size fields for E_Shell_Data Fix issue of nested compositors not working with Ecore_Wl2 library Update wl_weekeyboard for ecore_evas_wayland_window_get2 function rename Fix issue of using the wrong id when finding pixmap client check siginfo si_code to verify that SIGUSR2 comes from user Marcel Hollerbach (1): e_comp_wl: only ignore ignored clients Mike Blumenkrantz (39): call ecore_wl2_shutdown() in wl compositor delete callback create wl client connection during compositor init, use in shot module define EFL_BETA_API_SUPPORT explicitly in e.h if wayland support is enabled remove defines for various beta api in other places remove need_reparent, reparented, first_damage flags from wl client comp_data call xdg surface map when creating a surface for visible internal windows set want_focus for xdg popup surfaces on creation only do passthrough surface map on xwayland surfaces during commit more correctly handle evry mouse detection on wayland improve focus setting during wayland client show callback |= instead of = flag setting for want_focus during wayland surface commit automatically mark wayland cursor surfaces as visible during set_cursor do not set focus in wayland client show callback for cursor clients always apply damages and input regions during wayland commit remove duplicate visibility setting blocks from wayland surface commit add render updates for cursor clients if damages exist during set_cursor reenable fallthrough surface (un)mapping for subsurfaces during commit remove _e_comp_wl_focus_down_set() track wayland client mouse button states as a full button mask enable surface visibility fallthrough for drag clients unify client mouse action ending allow instant client mouse actions to persist until mouse up determine new_client state for xwayland clients using xwayland pixmap handle more mouse buttons in wayland allocate E_Shell_Data for all xdg surfaces (popups) add function for disabling mouse/key/wheel/signal bindings disable binding activation when grab dialog, menus, or dnd is active remove comp canvas key handler shortcuts for passing keys to wayland clients defer screenshot action execution using a job disable bindings during wayland screenshot operations do not attempt to create x11 canvas during xwayland init do not shortcut access of Efreet_Desktop->x hash in fileman disable shelf shadows if "noshadow" data item exists in shelf theme do not update keymap group in _e_comp_wl_input_keymap_update() update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input send mouse out+in on desk flip end disable map when unsetting zoomap child 20.4 release 20.4 NEWS updates --- This annotated tag includes the following new commits: new 157bee7 Make configure check for Ecore_Wl2 library new 01ac2a1 include header for Ecore_Wl2 new 5ff896f remove unused event loop and add external Ecore_Wl2_Display variable new 824003e port wayland compositor to use Ecore_Wl2 new b8a7b2b port e_scale to use Ecore_Wl2 new cf51751 Port shot module to use ecore_wl2 library new bdc41d2 Fix formatting of wl_weekeyboard module new 58c7122 Don't leak eina_iterator in shot module new 6e74356 Port wl_weekeyboard to use Ecore_Wl2 library new 5ea81d1 Port wl_fb module to use Ecore_Wl2 Library new c648775 Fix formatting new 8cc5207 Fix formatting new be2221e Try to init (and error check the init) of ecore_wl2 library before we cre
[EGIT] [core/enlightenment] enlightenment-0.20 26/59: set want_focus for xdg popup surfaces on creation
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=7b4b823758c87438624cc685e038c4126d944996 commit 7b4b823758c87438624cc685e038c4126d944996 Author: Mike Blumenkrantz Date: Tue Jan 19 13:45:08 2016 -0500 set want_focus for xdg popup surfaces on creation these types of surfaces should grab focus as early as possible, and setting the flag at this time ensures that it will be handled during the next client eval --- src/modules/wl_desktop_shell/e_mod_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 60279f4..1c9f7f6 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -1249,7 +1249,7 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource cdata->shell.unmap = _e_xdg_shell_surface_unmap; EC_CHANGED(ec); - ec->new_client = ec->override = 1; + ec->new_client = ec->want_focus = ec->override = 1; e_client_unignore(ec); e_comp->new_clients++; if (!ec->internal) --
[EGIT] [core/enlightenment] enlightenment-0.20 21/59: remove defines for various beta api in other places
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=bd8a8047181c1fe5075c47b1daf3e9e3a9254407 commit bd8a8047181c1fe5075c47b1daf3e9e3a9254407 Author: Mike Blumenkrantz Date: Wed Jan 6 13:01:38 2016 -0500 remove defines for various beta api in other places --- src/bin/Makefile.mk | 2 +- src/modules/Makefile_ibox.mk| 2 +- src/modules/conf_theme/e_int_config_color_classes.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk index 3e7266d..2974e46 100644 --- a/src/bin/Makefile.mk +++ b/src/bin/Makefile.mk @@ -377,7 +377,7 @@ src/bin/e_comp_wl_input.c \ src/bin/e_comp_wl.c endif -src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ +src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ src_bin_enlightenment_SOURCES = \ src/bin/e_main.c \ $(enlightenment_src) diff --git a/src/modules/Makefile_ibox.mk b/src/modules/Makefile_ibox.mk index fbed022..750a3de 100644 --- a/src/modules/Makefile_ibox.mk +++ b/src/modules/Makefile_ibox.mk @@ -10,7 +10,7 @@ iboxpkgdir = $(MDIR)/ibox/$(MODULE_ARCH) iboxpkg_LTLIBRARIES = src/modules/ibox/module.la src_modules_ibox_module_la_LIBADD = $(MOD_LIBS) -src_modules_ibox_module_la_CPPFLAGS = -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT $(MOD_CPPFLAGS) +src_modules_ibox_module_la_CPPFLAGS = $(MOD_CPPFLAGS) src_modules_ibox_module_la_LDFLAGS = $(MOD_LDFLAGS) src_modules_ibox_module_la_SOURCES = src/modules/ibox/e_mod_main.c \ src/modules/ibox/e_mod_main.h \ diff --git a/src/modules/conf_theme/e_int_config_color_classes.c b/src/modules/conf_theme/e_int_config_color_classes.c index 6659c5c..7486a1d 100644 --- a/src/modules/conf_theme/e_int_config_color_classes.c +++ b/src/modules/conf_theme/e_int_config_color_classes.c @@ -1,6 +1,4 @@ #include "e.h" -#define EFL_BETA_API_SUPPORT -#include static char * _translate(char *str) --
[EGIT] [core/enlightenment] enlightenment-0.20 50/59: disable bindings during wayland screenshot operations
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=a372e5ba1b248c36db4cc00c7ea12f6ab326da12 commit a372e5ba1b248c36db4cc00c7ea12f6ab326da12 Author: Mike Blumenkrantz Date: Fri Jan 22 16:31:07 2016 -0500 disable bindings during wayland screenshot operations recursive action activation is very bad. --- src/modules/shot/e_mod_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index 1663a9e..dfec8f9 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -955,6 +955,7 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params) shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(e_comp_wl->wl.client_disp); + e_bindings_disabled_set(1); EINA_LIST_FOREACH(_outputs, l, output) { if ((!zone) && @@ -971,6 +972,7 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params) while (!copy_done) ecore_main_loop_iterate(); } + e_bindings_disabled_set(0); bstride = sw * sizeof(int); dst = malloc(bstride * sh); --
[EGIT] [core/enlightenment] enlightenment-0.20 07/59: Fix formatting of wl_weekeyboard module
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=bdc41d238d0d06194a05ab7175f98d77eef55bd4 commit bdc41d238d0d06194a05ab7175f98d77eef55bd4 Author: Chris Michael Date: Mon Oct 26 10:00:29 2015 -0400 Fix formatting of wl_weekeyboard module Signed-off-by: Chris Michael --- src/modules/wl_weekeyboard/e_mod_main.c | 50 +++-- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/src/modules/wl_weekeyboard/e_mod_main.c b/src/modules/wl_weekeyboard/e_mod_main.c index c90f0fd..4d7293f 100644 --- a/src/modules/wl_weekeyboard/e_mod_main.c +++ b/src/modules/wl_weekeyboard/e_mod_main.c @@ -81,11 +81,14 @@ _wkb_commit_preedit_str(struct weekeyboard *wkb) return; wl_input_method_context_cursor_position(wkb->im_ctx, 0, 0); - wl_input_method_context_commit_string(wkb->im_ctx, wkb->serial, wkb->preedit_str); + wl_input_method_context_commit_string(wkb->im_ctx, wkb->serial, + wkb->preedit_str); if (wkb->surrounding_text) { -surrounding_text = _wkb_insert_text(wkb->surrounding_text, wkb->surrounding_cursor, wkb->preedit_str); +surrounding_text = + _wkb_insert_text(wkb->surrounding_text, wkb->surrounding_cursor, + wkb->preedit_str); free(wkb->surrounding_text); wkb->surrounding_text = surrounding_text; wkb->surrounding_cursor += strlen(wkb->preedit_str); @@ -106,13 +109,16 @@ _wkb_send_preedit_str(struct weekeyboard *wkb, int cursor) unsigned int index = strlen(wkb->preedit_str); if (wkb->preedit_style) - wl_input_method_context_preedit_styling(wkb->im_ctx, 0, strlen(wkb->preedit_str), wkb->preedit_style); + wl_input_method_context_preedit_styling(wkb->im_ctx, 0, + strlen(wkb->preedit_str), + wkb->preedit_style); if (cursor > 0) index = cursor; wl_input_method_context_preedit_cursor(wkb->im_ctx, index); - wl_input_method_context_preedit_string(wkb->im_ctx, wkb->serial, wkb->preedit_str, wkb->preedit_str); + wl_input_method_context_preedit_string(wkb->im_ctx, wkb->serial, + wkb->preedit_str, wkb->preedit_str); } static void @@ -194,7 +200,8 @@ _cb_wkb_on_key_down(void *data, Evas_Object *obj EINA_UNUSED, const char *emissi { _wkb_commit_preedit_str(wkb); wl_input_method_context_keysym(wkb->im_ctx, wkb->serial, 0, - XKB_KEY_Return, WL_KEYBOARD_KEY_STATE_PRESSED, 0); + XKB_KEY_Return, + WL_KEYBOARD_KEY_STATE_PRESSED, 0); goto end; } else if (eina_streq(key, "space")) @@ -222,12 +229,14 @@ _wkb_ui_setup(struct weekeyboard *wkb) if (!wkb->edje_obj) { Evas *evas; + ecore_evas_alpha_set(wkb->ee, EINA_TRUE); ecore_evas_title_set(wkb->ee, "Weekeyboard"); evas = ecore_evas_get(wkb->ee); wkb->edje_obj = edje_object_add(evas); -edje_object_signal_callback_add(wkb->edje_obj, "key_down", "*", _cb_wkb_on_key_down, wkb); +edje_object_signal_callback_add(wkb->edje_obj, "key_down", "*", +_cb_wkb_on_key_down, wkb); } // hard coded @@ -253,7 +262,8 @@ _wkb_ui_setup(struct weekeyboard *wkb) DBG("Using default_%d theme", w); } - snprintf(path, PATH_MAX, "%s/%s_%d.edj", e_module_dir_get(wkb->module), wkb->theme, w); + snprintf(path, PATH_MAX, "%s/%s_%d.edj", +e_module_dir_get(wkb->module), wkb->theme, w); INF("Loading edje file: '%s'", path); if (!edje_object_file_set(wkb->edje_obj, path, "main")) @@ -286,7 +296,8 @@ _wkb_ui_setup(struct weekeyboard *wkb) { int rx, ry, rw, rh; -edje_object_part_geometry_get(wkb->edje_obj, "background", &rx, &ry, &rw, &rh); +edje_object_part_geometry_get(wkb->edje_obj, "background", + &rx, &ry, &rw, &rh); ecore_wl_window_input_region_set(wkb->win, rx, ry, rw, rh); } @@ -313,7 +324,8 @@ _wkb_im_ctx_surrounding_text(void *data, struct wl_input_method_context *im_ctx, EINA_SAFETY_ON_NULL_RETURN(text); - DBG("im_context = %p text = '%s' cursor = %d anchor = %d", im_ctx, text, cursor, anchor); + DBG("im_context = %p text = '%s' cursor = %d anchor = %d", + im_ctx, text, cursor, anchor); free(wkb->surrounding_text); @@ -399,7 +411,8 @@ _wkb_im_ctx_commit_state(void *data, struct wl_input_method_context *im_ctx, uin wkb->serial = serial; wl_input_method_context_language(im_ctx, wkb->serial, "en"); - wl_input_method_context_text_direction(im_ctx, wkb->serial, WL_TEXT_INPUT_TEXT_DIRECTION_LTR); + wl_input_method_context_text_dir
[EGIT] [core/enlightenment] enlightenment-0.20 49/59: defer screenshot action execution using a job
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=e5e2a7cca4bf86ee70444b52ec0640888601d503 commit e5e2a7cca4bf86ee70444b52ec0640888601d503 Author: Mike Blumenkrantz Date: Fri Jan 22 16:23:21 2016 -0500 defer screenshot action execution using a job the drm screenshot action forcefully iterates the main loop, causing the current loop (which triggered the action) to return after the screenshot action has ended. during this time, it's possible for other actions to also trigger, including triggering subsequent screenshot actions, so it's necessary to defer the execution of the action until after the initial loop which triggered the action has returned #Recursion --- src/modules/shot/e_mod_main.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index 0174bbb..1663a9e 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -1193,10 +1193,31 @@ _e_mod_action_border_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSE _wl_shot_now(NULL, ec, NULL); } +typedef struct +{ + E_Zone *zone; + char *params; +} Delayed_Shot; + +static void +_delayed_shot(void *data) +{ + Delayed_Shot *ds = data; + + if (e_comp->comp_type == E_PIXMAP_TYPE_X) + _x_shot_now(ds->zone, NULL, ds->params); + else + _wl_shot_now(ds->zone, NULL, ds->params); + e_object_unref(E_OBJECT(ds->zone)); + free(ds->params); + free(ds); +} + static void _e_mod_action_cb(E_Object *obj, const char *params) { E_Zone *zone = NULL; + Delayed_Shot *ds; if (obj) { @@ -1210,10 +1231,14 @@ _e_mod_action_cb(E_Object *obj, const char *params) if (!zone) zone = e_zone_current_get(); if (!zone) return; E_FREE_FUNC(timer, ecore_timer_del); - if (e_comp->comp_type == E_PIXMAP_TYPE_X) - _x_shot_now(zone, NULL, params); - else - _wl_shot_now(zone, NULL, params); + ds = E_NEW(Delayed_Shot, 1); + e_object_ref(E_OBJECT(zone)); + ds->zone = zone; + ds->params = params ? strdup(params) : NULL; + /* forced main loop iteration in screenshots causes bugs if the action +* executes immediately +*/ + ecore_job_add(_delayed_shot, ds); } static void --
[EGIT] [core/enlightenment] enlightenment-0.20 15/59: Fix type of size fields for E_Shell_Data
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=59762676a8046fd671ecdcb00f2b794e575c94df commit 59762676a8046fd671ecdcb00f2b794e575c94df Author: Chris Michael Date: Tue Dec 15 10:20:33 2015 -0500 Fix type of size fields for E_Shell_Data In the xdg_surface_configure_send function, the size params (width/height) come in as int32_t. This patch makes the E_Shell_Data fields for width & height match those (else we end up with compiler warnings when comparing int32_t to uint32_t). Signed-off-by: Chris Michael --- src/modules/wl_desktop_shell/e_mod_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 9935c35..bb4020d 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -8,8 +8,8 @@ struct E_Shell_Data { uint32_t edges; - uint32_t width; - uint32_t height; + int32_t width; + int32_t height; Eina_Bool fullscreen : 1; Eina_Bool maximized : 1; Eina_Bool activated : 1; --
[EGIT] [core/enlightenment] enlightenment-0.20 30/59: |= instead of = flag setting for want_focus during wayland surface commit
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f129b0d7d5698e1220a13d895964fc7dd82691e4 commit f129b0d7d5698e1220a13d895964fc7dd82691e4 Author: Mike Blumenkrantz Date: Tue Jan 19 13:52:07 2016 -0500 |= instead of = flag setting for want_focus during wayland surface commit if want_focus has already been set, this check should not unset it --- src/bin/e_comp_wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 0d8eacf..a7dc24d 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1143,7 +1143,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) if (ec->new_client) { ec->placed = placed; - ec->want_focus = ec->icccm.accepts_focus && (!ec->override); + ec->want_focus |= ec->icccm.accepts_focus && (!ec->override); } else if ((first) && (ec->placed) && (!ec->internal) && (!ec->override)) { --
[EGIT] [core/enlightenment] enlightenment-0.20 57/59: disable map when unsetting zoomap child
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=c6d96feea284a4ea149a448d075a80a799f04051 commit c6d96feea284a4ea149a448d075a80a799f04051 Author: Mike Blumenkrantz Date: Mon Feb 1 17:31:20 2016 -0500 disable map when unsetting zoomap child if the existing map is left enabled when the child is removed from the zoomap, the child object will be permanently misrendered with the previously applied map --- src/bin/e_zoomap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/e_zoomap.c b/src/bin/e_zoomap.c index f27b665..682412f 100644 --- a/src/bin/e_zoomap.c +++ b/src/bin/e_zoomap.c @@ -50,6 +50,8 @@ e_zoomap_child_set(Evas_Object *obj, Evas_Object *child) if (child == sd->child_obj) return; if (sd->child_obj) { +evas_object_map_set(sd->child_obj, NULL); +evas_object_map_enable_set(sd->child_obj, EINA_FALSE); evas_object_clip_unset(sd->child_obj); evas_object_smart_member_del(sd->child_obj); evas_object_event_callback_del(sd->child_obj, EVAS_CALLBACK_DEL, --
[EGIT] [core/enlightenment] enlightenment-0.20 36/59: reenable fallthrough surface (un)mapping for subsurfaces during commit
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=65c222698cb9a8185314cd1f46f542c9c00a4c85 commit 65c222698cb9a8185314cd1f46f542c9c00a4c85 Author: Mike Blumenkrantz Date: Wed Jan 20 16:58:24 2016 -0500 reenable fallthrough surface (un)mapping for subsurfaces during commit subsurfaces have no shell interface and rely upon the map state of parent surfaces to determine whether they are mapped --- src/bin/e_comp_wl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 12a072f..de44dce 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1070,7 +1070,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || + (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -1084,7 +1085,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) { if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) + else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || + (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped)) { ec->visible = EINA_TRUE; ec->ignored = 0; --
[EGIT] [core/enlightenment] enlightenment-0.20 34/59: remove duplicate visibility setting blocks from wayland surface commit
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=45d8cb6b5e1642b3f151596be78fb132c64290f5 commit 45d8cb6b5e1642b3f151596be78fb132c64290f5 Author: Mike Blumenkrantz Date: Wed Jan 20 16:20:41 2016 -0500 remove duplicate visibility setting blocks from wayland surface commit this is already present (and identical) in state commit --- src/bin/e_comp_wl.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index e4b9744..12a072f 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2736,44 +2736,10 @@ e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id) EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec) { - Eina_Bool ignored; - _e_comp_wl_surface_state_commit(ec, &ec->comp_data->pending); if (!e_comp_object_damage_exists(ec->frame)) e_pixmap_image_clear(ec->pixmap, 1); - ignored = ec->ignored; - - if (!e_pixmap_usable_get(ec->pixmap)) - { -if (ec->comp_data->mapped) - { - if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) - ec->comp_data->shell.unmap(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) - { - ec->visible = EINA_FALSE; - evas_object_hide(ec->frame); - ec->comp_data->mapped = 0; - } - } - } - else - { -if (!ec->comp_data->mapped) - { - if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) - ec->comp_data->shell.map(ec->comp_data->shell.surface); - else if (ec->comp_data->cursor || e_client_has_xwindow(ec)) - { - ec->visible = EINA_TRUE; - ec->ignored = 0; - evas_object_show(ec->frame); - ec->comp_data->mapped = 1; - } - } - } - ec->ignored = ignored; return EINA_TRUE; } --
[EGIT] [core/enlightenment] enlightenment-0.20 09/59: Port wl_weekeyboard to use Ecore_Wl2 library
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=6e743567e6cb0c9094377fb53fc9e967fb248ab2 commit 6e743567e6cb0c9094377fb53fc9e967fb248ab2 Author: Chris Michael Date: Mon Oct 26 10:09:02 2015 -0400 Port wl_weekeyboard to use Ecore_Wl2 library Signed-off-by: Chris Michael --- src/modules/wl_weekeyboard/e_mod_main.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/modules/wl_weekeyboard/e_mod_main.c b/src/modules/wl_weekeyboard/e_mod_main.c index 4d7293f..060a5a7 100644 --- a/src/modules/wl_weekeyboard/e_mod_main.c +++ b/src/modules/wl_weekeyboard/e_mod_main.c @@ -9,7 +9,7 @@ struct weekeyboard { E_Module *module; Ecore_Evas *ee; - Ecore_Wl_Window *win; + Ecore_Wl2_Window *win; Evas_Object *edje_obj; const char *ee_engine; char **ignore_keys; @@ -250,7 +250,7 @@ _wkb_ui_setup(struct weekeyboard *wkb) if (eina_streq(wkb->theme, "default")) { -ecore_wl_screen_size_get(&w, &h); +ecore_wl2_display_screen_size_get(ewd, &w, &h); DBG("Screen size: w=%d, h=%d", w, h); if (w >= 1080) w = 1080; @@ -298,7 +298,7 @@ _wkb_ui_setup(struct weekeyboard *wkb) edje_object_part_geometry_get(wkb->edje_obj, "background", &rx, &ry, &rw, &rh); -ecore_wl_window_input_region_set(wkb->win, rx, ry, rw, rh); +ecore_wl2_window_input_region_set(wkb->win, rx, ry, rw, rh); } ignore_keys = edje_file_data_get(path, "ignore-keys"); @@ -501,15 +501,18 @@ static const struct wl_input_method_listener wkb_im_listener = { static Eina_Bool _wkb_setup(struct weekeyboard *wkb) { - Eina_Inlist *globals; + Eina_Iterator *itr; + Ecore_Wl2_Global *global; struct wl_registry *registry; - Ecore_Wl_Global *global; struct wl_input_panel_surface *ips; + void *data; - globals = ecore_wl_globals_get(); - registry = ecore_wl_registry_get(); - EINA_INLIST_FOREACH(globals, global) + registry = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd); + itr = ecore_wl2_display_globals_get(ewd); + EINA_ITERATOR_FOREACH(itr, data) { +global = (Ecore_Wl2_Global *)data; + DBG("interface: <%s>", global->interface); if (eina_streq(global->interface, "wl_input_panel")) { @@ -532,6 +535,7 @@ _wkb_setup(struct weekeyboard *wkb) DBG("binding wl_output"); } } + eina_iterator_free(itr); if ((!wkb->ip) || (!wkb->im) || (!wkb->output)) return EINA_FALSE; @@ -541,9 +545,11 @@ _wkb_setup(struct weekeyboard *wkb) /* Set input panel surface */ DBG("Setting up input panel"); - wkb->win = ecore_evas_wayland_window_get(wkb->ee); - ecore_wl_window_type_set(wkb->win, ECORE_WL_WINDOW_TYPE_NONE); - wkb->surface = ecore_wl_window_surface_create(wkb->win); + + wkb->win = ecore_evas_wayland_window_get2(wkb->ee); + ecore_wl2_window_type_set(wkb->win, ECORE_WL2_WINDOW_TYPE_NONE); + + wkb->surface = ecore_wl2_window_surface_get(wkb->win); ips = wl_input_panel_get_input_panel_surface(wkb->ip, wkb->surface); wl_input_panel_surface_set_toplevel(ips, wkb->output, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM); --
[EGIT] [core/enlightenment] enlightenment-0.20 51/59: do not attempt to create x11 canvas during xwayland init
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=3fbdc847ab7f0ab7cb9612521c631f9b97981c71 commit 3fbdc847ab7f0ab7cb9612521c631f9b97981c71 Author: Mike Blumenkrantz Date: Fri Jan 22 17:06:42 2016 -0500 do not attempt to create x11 canvas during xwayland init this kills the gl_drm engine --- src/bin/e_comp_x.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 18e95bd..d9de9d2 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -5237,8 +5237,11 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h) e_alert_composite_win(root, e_comp->win); - if (!e_comp_x_randr_canvas_new(e_comp->win, w, h)) - ecore_job_add(_e_comp_x_add_fail_job, NULL); + if (!e_comp->ee) + { +if (!e_comp_x_randr_canvas_new(e_comp->win, w, h)) + ecore_job_add(_e_comp_x_add_fail_job, NULL); + } ecore_x_composite_redirect_subwindows(root, ECORE_X_COMPOSITE_UPDATE_MANUAL); --
[EGIT] [core/enlightenment] enlightenment-0.20 59/59: 20.4 NEWS updates
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f3b9d9a9c61ad2cbb4c5e33885cacef3941144c6 commit f3b9d9a9c61ad2cbb4c5e33885cacef3941144c6 Author: Mike Blumenkrantz Date: Tue Feb 2 13:47:46 2016 -0500 20.4 NEWS updates --- NEWS | 68 1 file changed, 68 insertions(+) diff --git a/NEWS b/NEWS index ee54de7..c52368f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,71 @@ +Release 0.20.4: +- +Chris Michael (5): + Fix type of size fields for E_Shell_Data + Fix issue of nested compositors not working with Ecore_Wl2 library + Update wl_weekeyboard for ecore_evas_wayland_window_get2 function rename + Fix issue of using the wrong id when finding pixmap client + check siginfo si_code to verify that SIGUSR2 comes from user + +Christopher Michael (14): + Make configure check for Ecore_Wl2 library + include header for Ecore_Wl2 + remove unused event loop and add external Ecore_Wl2_Display variable + port wayland compositor to use Ecore_Wl2 + port e_scale to use Ecore_Wl2 + Port shot module to use ecore_wl2 library + Fix formatting of wl_weekeyboard module + Don't leak eina_iterator in shot module + Port wl_weekeyboard to use Ecore_Wl2 library + Port wl_fb module to use Ecore_Wl2 Library + Fix formatting + Fix formatting + Try to init (and error check the init) of ecore_wl2 library before we create a compositor + Fix using global ewd variable by making it part of e_comp_wl + +Marcel Hollerbach (1): + e_comp_wl: only ignore ignored clients + +Mike Blumenkrantz (37): + call ecore_wl2_shutdown() in wl compositor delete callback + create wl client connection during compositor init, use in shot module + define EFL_BETA_API_SUPPORT explicitly in e.h if wayland support is enabled + remove defines for various beta api in other places + remove need_reparent, reparented, first_damage flags from wl client comp_data + call xdg surface map when creating a surface for visible internal windows + set want_focus for xdg popup surfaces on creation + only do passthrough surface map on xwayland surfaces during commit + more correctly handle evry mouse detection on wayland + improve focus setting during wayland client show callback + |= instead of = flag setting for want_focus during wayland surface commit + automatically mark wayland cursor surfaces as visible during set_cursor + do not set focus in wayland client show callback for cursor clients + always apply damages and input regions during wayland commit + remove duplicate visibility setting blocks from wayland surface commit + add render updates for cursor clients if damages exist during set_cursor + reenable fallthrough surface (un)mapping for subsurfaces during commit + remove _e_comp_wl_focus_down_set() + track wayland client mouse button states as a full button mask + enable surface visibility fallthrough for drag clients + unify client mouse action ending + allow instant client mouse actions to persist until mouse up + determine new_client state for xwayland clients using xwayland pixmap + handle more mouse buttons in wayland + allocate E_Shell_Data for all xdg surfaces (popups) + add function for disabling mouse/key/wheel/signal bindings + disable binding activation when grab dialog, menus, or dnd is active + remove comp canvas key handler shortcuts for passing keys to wayland clients + defer screenshot action execution using a job + disable bindings during wayland screenshot operations + do not attempt to create x11 canvas during xwayland init + do not shortcut access of Efreet_Desktop->x hash in fileman + disable shelf shadows if "noshadow" data item exists in shelf theme + do not update keymap group in _e_comp_wl_input_keymap_update() + update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input + send mouse out+in on desk flip end + disable map when unsetting zoomap child + + Release 0.20.3: - Carsten Haitzler (1): --
[EGIT] [core/enlightenment] enlightenment-0.20 39/59: track wayland client mouse button states as a full button mask
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=c0be62b0b46238256e8c0c8b1192400cab2472df commit c0be62b0b46238256e8c0c8b1192400cab2472df Author: Mike Blumenkrantz Date: Thu Jan 21 12:52:21 2016 -0500 track wayland client mouse button states as a full button mask sending a button release event to a surface which has not previously received a button press yields strange results --- src/bin/e_comp_wl.c | 8 src/bin/e_comp_wl.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index b0d2948..425b74a 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3099,6 +3099,14 @@ e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t bu break; } + if (state == WL_POINTER_BUTTON_STATE_PRESSED) + e_comp_wl->ptr.button_mask |= 1 << button_id; + else + { +/* reject release events if button is not pressed */ +if (!(e_comp_wl->ptr.button_mask & (1 << button_id))) return EINA_FALSE; +e_comp_wl->ptr.button_mask &= ~(1 << button_id); + } e_comp_wl->ptr.button = btn; if (!ec->comp_data->surface) return EINA_FALSE; diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index d280eb3..48c085f 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -167,6 +167,7 @@ struct _E_Comp_Wl_Data wl_fixed_t x, y; wl_fixed_t grab_x, grab_y; uint32_t button; +uint32_t button_mask; E_Client *ec; Eina_Bool enabled : 1; } ptr; --
[EGIT] [core/enlightenment] enlightenment-0.20 33/59: always apply damages and input regions during wayland commit
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=47196af43a5fb7eede6f4a4a56f9a88405b8 commit 47196af43a5fb7eede6f4a4a56f9a88405b8 Author: Mike Blumenkrantz Date: Wed Jan 20 16:19:50 2016 -0500 always apply damages and input regions during wayland commit mapped status is not relevant according to spec --- src/bin/e_comp_wl.c | 8 1 file changed, 8 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 00fcebf..e4b9744 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1163,7 +1163,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) state->frames = NULL; ec->ignored = ignored; - if (!ec->comp_data->mapped) goto unmapped; /* put state damages into surface */ if ((!e_comp->nocomp) && (ec->frame)) @@ -1227,13 +1226,6 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) /* clear input tiler */ eina_tiler_clear(state->input); } - - return; - -unmapped: - /* clear pending damages */ - EINA_LIST_FREE(state->damages, dmg) - eina_rectangle_free(dmg); } static void --
[EGIT] [core/enlightenment] enlightenment-0.20 16/59: Fix issue of nested compositors not working with Ecore_Wl2 library
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=9400e33bab093a8b69286ffb83e1a1982b939944 commit 9400e33bab093a8b69286ffb83e1a1982b939944 Author: Chris Michael Date: Tue Jan 5 13:15:56 2016 -0500 Fix issue of nested compositors not working with Ecore_Wl2 library Signed-off-by: Chris Michael --- src/modules/Makefile_wl_wl.mk | 3 +- src/modules/wl_wl/e_mod_main.c | 35 src/modules/wl_wl/wl.c | 119 - 3 files changed, 27 insertions(+), 130 deletions(-) diff --git a/src/modules/Makefile_wl_wl.mk b/src/modules/Makefile_wl_wl.mk index 1721a3f..5a7e71c 100644 --- a/src/modules/Makefile_wl_wl.mk +++ b/src/modules/Makefile_wl_wl.mk @@ -9,8 +9,7 @@ src_modules_wl_wl_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WAYLAND_CFLAGS@ src_modules_wl_wl_module_la_LIBADD = $(LIBS) @WAYLAND_LIBS@ src_modules_wl_wl_module_la_LDFLAGS = $(MOD_LDFLAGS) src_modules_wl_wl_module_la_SOURCES = \ -src/modules/wl_wl/e_mod_main.c \ -src/modules/wl_wl/wl.c +src/modules/wl_wl/e_mod_main.c PHONIES += wl_wl install-wl_wl wl_wl: $(wl_wlpkg_LTLIBRARIES) $(wl_wl_DATA) diff --git a/src/modules/wl_wl/e_mod_main.c b/src/modules/wl_wl/e_mod_main.c index 5cc0aaa..5f151e7 100644 --- a/src/modules/wl_wl/e_mod_main.c +++ b/src/modules/wl_wl/e_mod_main.c @@ -1,7 +1,5 @@ #include "e.h" -EINTERN void wl_wl_init(void); - E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Wl" }; static void @@ -10,11 +8,27 @@ _cb_delete_request(Ecore_Evas *ee EINA_UNUSED) ecore_main_loop_quit(); } -E_API void * -e_modapi_init(E_Module *m) +static Eina_Bool +_cb_sync_done(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) { + Ecore_Wl2_Event_Sync_Done *ev; int w = 0, h = 0; + ev = event; + if (ev->display != e_comp_wl->wl.client_disp) + return ECORE_CALLBACK_PASS_ON; + + ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h); + if ((w < 1) || (h < 1)) return ECORE_CALLBACK_PASS_ON; + + e_comp_canvas_resize(w / 4, h / 4); + + return ECORE_CALLBACK_PASS_ON; +} + +E_API void * +e_modapi_init(E_Module *m) +{ printf("LOAD WL_WL MODULE\n"); if (e_comp_config_get()->engine == E_COMP_ENGINE_GL) @@ -38,17 +52,17 @@ e_modapi_init(E_Module *m) return NULL; } } + + ecore_evas_data_set(e_comp->ee, "comp", e_comp); ecore_evas_callback_delete_request_set(e_comp->ee, _cb_delete_request); ecore_evas_title_set(e_comp->ee, "Enlightenment: WL-WL"); ecore_evas_name_class_set(e_comp->ee, "E", "compositor"); - ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h); + ecore_event_handler_add(ECORE_WL2_EVENT_SYNC_DONE, _cb_sync_done, NULL); if (!e_comp_wl_init()) return NULL; - if (!e_comp_canvas_init(w * 3 / 4, h * 3 / 4)) return NULL; + if (!e_comp_canvas_init(1024, 768)) return NULL; - ecore_evas_pointer_xy_get(e_comp->ee, &e_comp_wl->ptr.x, - &e_comp_wl->ptr.y); e_comp_wl_input_pointer_enabled_set(EINA_TRUE); e_comp_wl_input_keyboard_enabled_set(EINA_TRUE); e_comp_wl_input_touch_enabled_set(EINA_TRUE); @@ -59,7 +73,10 @@ e_modapi_init(E_Module *m) e_comp->pointer->color = EINA_TRUE; e_comp_wl_input_keymap_set(NULL, NULL, NULL); - wl_wl_init(); + + ecore_evas_pointer_xy_get(e_comp->ee, &e_comp_wl->ptr.x, + &e_comp_wl->ptr.y); + evas_event_feed_mouse_in(e_comp->evas, 0, NULL); return m; } diff --git a/src/modules/wl_wl/wl.c b/src/modules/wl_wl/wl.c deleted file mode 100644 index 3242770..000 --- a/src/modules/wl_wl/wl.c +++ /dev/null @@ -1,119 +0,0 @@ -#include "e.h" - -static struct wl_display *disp; -static Ecore_Fd_Handler *wl_fdh; - -static void -_wl_handle_global(void *data EINA_UNUSED, struct wl_registry *registry EINA_UNUSED, unsigned int id, const char *interface, unsigned int version) -{ - Ecore_Wl_Global *global; - - if (!(global = calloc(1, sizeof(Ecore_Wl_Global return; - - global->id = id; - global->interface = strdup(interface); - global->version = version; - e_comp_wl->wl.globals = eina_inlist_append(e_comp_wl->wl.globals, EINA_INLIST_GET(global)); - - if (!strcmp(interface, "wl_shm")) - e_comp_wl->wl.shm = wl_registry_bind(registry, id, &wl_shm_interface, 1); - ecore_event_add(E_EVENT_WAYLAND_GLOBAL_ADD, NULL, NULL, NULL); -} - -static void -_wl_handle_global_remove(void *data EINA_UNUSED, struct wl_registry *registry EINA_UNUSED, unsigned int id) -{ - Ecore_Wl_Global *global; - Eina_Inlist *tmp; - - EINA_INLIST_FOREACH_SAFE(e_comp_wl->wl.globals, tmp, global) - { -if (global->id != id) continue; -e_comp_wl->wl.globals = - eina_inlist_remove(e_comp_wl->wl.globals, EINA_INLIST_GET(global)); -free(global->interface); -free(global); - } -} - -static const struct wl_registry_listener _global_registry_listener
[EGIT] [core/enlightenment] enlightenment-0.20 14/59: Fix using global ewd variable by making it part of e_comp_wl
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=96b55ce441d68c7a23a15a344c850d92a35af544 commit 96b55ce441d68c7a23a15a344c850d92a35af544 Author: Chris Michael Date: Mon Dec 7 09:46:11 2015 -0500 Fix using global ewd variable by making it part of e_comp_wl ref T2919 Signed-off-by: Chris Michael --- src/bin/e_comp_wl.c | 11 +-- src/bin/e_comp_wl.h | 4 ++-- src/bin/e_grabinput.c | 1 - src/modules/wl_weekeyboard/e_mod_main.c | 6 +++--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 4fee9dc..52504de 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -14,7 +14,6 @@ #endif E_API int E_EVENT_WAYLAND_GLOBAL_ADD = -1; -E_API Ecore_Wl2_Display *ewd = NULL; #include "session-recovery-server-protocol.h" @@ -2542,15 +2541,15 @@ _e_comp_wl_compositor_create(void) /* wl_log_set_handler_server(_e_comp_wl_log_cb_print); */ /* try to create an ecore_wl2 display */ - ewd = ecore_wl2_display_create(NULL); - if (!ewd) + cdata->ewd = ecore_wl2_display_create(NULL); + if (!cdata->ewd) { ERR("Could not create a Wayland display: %m"); free(cdata); return EINA_FALSE; } - cdata->wl.disp = ecore_wl2_display_get(ewd); + cdata->wl.disp = ecore_wl2_display_get(cdata->ewd); if (!cdata->wl.disp) { ERR("Could not create a Wayland display: %m"); @@ -2677,7 +2676,7 @@ data_err: comp_global_err: /* e_env_unset("WAYLAND_DISPLAY"); */ /* sock_err: */ - ecore_wl2_display_destroy(ewd); + ecore_wl2_display_destroy(cdata->ewd); disp_err: free(cdata); return EINA_FALSE; @@ -2839,7 +2838,7 @@ e_comp_wl_shutdown(void) if (e_comp_wl->wl.shm) wl_shm_destroy(e_comp_wl->wl.shm); _e_comp_wl_gl_shutdown(); - ecore_wl2_display_destroy(ewd); + ecore_wl2_display_destroy(e_comp_wl->ewd); /* shutdown ecore_wayland */ ecore_wl2_shutdown(); diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 1493d14..41dcdae 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -99,6 +99,8 @@ struct _E_Comp_Wl_Subsurf_Data struct _E_Comp_Wl_Data { + Ecore_Wl2_Display *ewd; + struct { struct wl_display *disp; @@ -341,8 +343,6 @@ E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timest E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD; -E_API extern Ecore_Wl2_Display *ewd; - # ifndef HAVE_WAYLAND_ONLY EINTERN void e_comp_wl_xwayland_client_queue(E_Client *ec); static inline E_Comp_X_Client_Data * diff --git a/src/bin/e_grabinput.c b/src/bin/e_grabinput.c index c050a08..6bf5852 100644 --- a/src/bin/e_grabinput.c +++ b/src/bin/e_grabinput.c @@ -189,7 +189,6 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method) case E_FOCUS_METHOD_PASSIVE: #ifndef HAVE_WAYLAND_ONLY if (e_comp_util_has_x()) - ecore_x_window_focus(win); #endif break; diff --git a/src/modules/wl_weekeyboard/e_mod_main.c b/src/modules/wl_weekeyboard/e_mod_main.c index 060a5a7..5a45aea 100644 --- a/src/modules/wl_weekeyboard/e_mod_main.c +++ b/src/modules/wl_weekeyboard/e_mod_main.c @@ -250,7 +250,7 @@ _wkb_ui_setup(struct weekeyboard *wkb) if (eina_streq(wkb->theme, "default")) { -ecore_wl2_display_screen_size_get(ewd, &w, &h); +ecore_wl2_display_screen_size_get(e_comp_wl->ewd, &w, &h); DBG("Screen size: w=%d, h=%d", w, h); if (w >= 1080) w = 1080; @@ -507,8 +507,8 @@ _wkb_setup(struct weekeyboard *wkb) struct wl_input_panel_surface *ips; void *data; - registry = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd); - itr = ecore_wl2_display_globals_get(ewd); + registry = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(e_comp_wl->ewd); + itr = ecore_wl2_display_globals_get(e_comp_wl->ewd); EINA_ITERATOR_FOREACH(itr, data) { global = (Ecore_Wl2_Global *)data; --
[EGIT] [core/enlightenment] enlightenment-0.20 40/59: enable surface visibility fallthrough for drag clients
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=3535581b2c1987dea7066871ce5edf75fa244822 commit 3535581b2c1987dea7066871ce5edf75fa244822 Author: Mike Blumenkrantz Date: Thu Jan 21 13:00:10 2016 -0500 enable surface visibility fallthrough for drag clients more surfaces with no shell interfaces --- src/bin/e_comp_wl.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 425b74a..c48c6d3 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1061,7 +1061,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || - (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped)) + (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped) || + (ec == e_comp_wl->drag_client)) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); @@ -1076,7 +1077,8 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.map)) ec->comp_data->shell.map(ec->comp_data->shell.surface); else if (ec->comp_data->cursor || e_client_has_xwindow(ec) || - (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped)) + (ec->comp_data->sub.data && ec->comp_data->sub.data->parent->comp_data->mapped) || + (ec == e_comp_wl->drag_client)) { ec->visible = EINA_TRUE; ec->ignored = 0; --
[EGIT] [core/enlightenment] enlightenment-0.20 44/59: handle more mouse buttons in wayland
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=97b65584445cd190d4b020111cc9e1ce580ce259 commit 97b65584445cd190d4b020111cc9e1ce580ce259 Author: Mike Blumenkrantz Date: Thu Jan 21 16:28:25 2016 -0500 handle more mouse buttons in wayland according to the "reference" compositor this is how it works --- src/bin/e_comp_wl.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 9e9c1ad..cd4a0c5 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3100,8 +3100,14 @@ e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t bu case 3: btn = BTN_RIGHT; break; + case 4: + case 5: + case 6: + case 7: +/* these are supposedly axis events */ +return EINA_FALSE; default: -btn = button_id; +btn = button_id + BTN_SIDE - 8; break; } --
[EGIT] [core/enlightenment] enlightenment-0.20 17/59: Update wl_weekeyboard for ecore_evas_wayland_window_get2 function rename
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=641fb52c62fbd451acd4fe44854a70a269c3282c commit 641fb52c62fbd451acd4fe44854a70a269c3282c Author: Chris Michael Date: Fri Jan 8 10:37:42 2016 -0500 Update wl_weekeyboard for ecore_evas_wayland_window_get2 function rename Signed-off-by: Chris Michael --- src/modules/wl_weekeyboard/e_mod_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wl_weekeyboard/e_mod_main.c b/src/modules/wl_weekeyboard/e_mod_main.c index 5a45aea..b3dfc24 100644 --- a/src/modules/wl_weekeyboard/e_mod_main.c +++ b/src/modules/wl_weekeyboard/e_mod_main.c @@ -546,7 +546,7 @@ _wkb_setup(struct weekeyboard *wkb) /* Set input panel surface */ DBG("Setting up input panel"); - wkb->win = ecore_evas_wayland_window_get2(wkb->ee); + wkb->win = ecore_evas_wayland2_window_get(wkb->ee); ecore_wl2_window_type_set(wkb->win, ECORE_WL2_WINDOW_TYPE_NONE); wkb->surface = ecore_wl2_window_surface_get(wkb->win); --
[EGIT] [core/enlightenment] enlightenment-0.20 12/59: Fix formatting
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=8cc52073558fccf18d25a9f70e3f78e9dd4f5559 commit 8cc52073558fccf18d25a9f70e3f78e9dd4f5559 Author: Chris Michael Date: Mon Oct 26 10:30:23 2015 -0400 Fix formatting Signed-off-by: Chris Michael --- src/bin/e_comp_wl_data.c | 99 +++- 1 file changed, 64 insertions(+), 35 deletions(-) diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index 2da7de4..54a6f70 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -70,7 +70,7 @@ _e_comp_wl_data_offer_cb_source_destroy(struct wl_listener *listener, void *data E_Comp_Wl_Data_Offer *offer; DBG("Data Offer Source Destroy"); - offer = container_of(listener, E_Comp_Wl_Data_Offer, + offer = container_of(listener, E_Comp_Wl_Data_Offer, source_destroy_listener); if (!offer) return; @@ -256,14 +256,13 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour if (focus) { data_device_res = - e_comp_wl_data_find_for_client(wl_resource_get_client(focus)); + e_comp_wl_data_find_for_client(wl_resource_get_client(focus)); if ((data_device_res) && (source)) { offer_res = -_e_comp_wl_data_device_data_offer_create(source, - data_device_res); + _e_comp_wl_data_device_data_offer_create(source, +data_device_res); wl_data_device_send_selection(data_device_res, offer_res); - } else if (data_device_res) wl_data_device_send_selection(data_device_res, NULL); @@ -302,8 +301,10 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped) if (e_client_has_xwindow(e_comp_wl->selection.target)) { ecore_x_client_message32_send(e_client_util_win_get(e_comp_wl->selection.target), - ECORE_X_ATOM_XDND_DROP, ECORE_X_EVENT_MASK_NONE, - e_comp->cm_selection, 0, ecore_x_current_time_get(), 0, 0); + ECORE_X_ATOM_XDND_DROP, + ECORE_X_EVENT_MASK_NONE, + e_comp->cm_selection, 0, + ecore_x_current_time_get(), 0, 0); } else #endif @@ -319,7 +320,8 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped) #ifndef HAVE_WAYLAND_ONLY if (e_comp_util_has_xwayland()) { - ecore_x_selection_owner_set(0, ECORE_X_ATOM_SELECTION_XDND, ecore_x_current_time_get()); + ecore_x_selection_owner_set(0, ECORE_X_ATOM_SELECTION_XDND, + ecore_x_current_time_get()); ecore_x_window_hide(e_comp->cm_selection); } #endif @@ -340,7 +342,8 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc DBG("Data Device Drag Start"); - if ((e_comp_wl->kbd.focus) && (e_comp_wl->kbd.focus != origin_resource)) return; + if ((e_comp_wl->kbd.focus) && (e_comp_wl->kbd.focus != origin_resource)) + return; if (!(source = wl_resource_get_user_data(source_resource))) return; e_comp_wl->drag_source = source; @@ -371,9 +374,10 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc } evas_pointer_canvas_xy_get(e_comp->evas, &x, &y); - e_comp_wl->drag = e_drag_new(x, y, - NULL, 0, NULL, 0, NULL, _e_comp_wl_data_device_drag_finished); - e_comp_wl->drag->button_mask = evas_pointer_button_down_mask_get(e_comp->evas); + e_comp_wl->drag = e_drag_new(x, y, NULL, 0, NULL, 0, NULL, +_e_comp_wl_data_device_drag_finished); + e_comp_wl->drag->button_mask = + evas_pointer_button_down_mask_get(e_comp->evas); if (ec) e_drag_object_set(e_comp_wl->drag, ec->frame); e_drag_start(e_comp_wl->drag, x, y); @@ -381,7 +385,9 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client, struct wl_resourc if (e_comp_util_has_xwayland()) { ecore_x_window_show(e_comp->cm_selection); -ecore_x_selection_owner_set(e_comp->cm_selection, ECORE_X_ATOM_SELECTION_XDND, ecore_x_current_time_get()); +ecore_x_selection_owner_set(e_comp->cm_selection, +ECORE_X_ATOM_SELECTION_XDND, +ecore_x_current_time_get()); } #endif if (e_comp_wl->ptr.ec) @@ -441,7 +447,8 @@ _e_comp_wl_data_manager_cb_device_get(struct wl_client *client, struct wl_resour } eina_hash_add(e_comp_wl->mgr.data_resources, &client, res); - wl_resource_se
[EGIT] [core/enlightenment] enlightenment-0.20 06/59: Port shot module to use ecore_wl2 library
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=cf517513473f7234bb1ebc4a17adbd33a0d6a0e7 commit cf517513473f7234bb1ebc4a17adbd33a0d6a0e7 Author: Chris Michael Date: Mon Oct 26 09:54:53 2015 -0400 Port shot module to use ecore_wl2 library Signed-off-by: Chris Michael --- src/modules/shot/e_mod_main.c | 35 --- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index c7b9075..60919b0 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -953,7 +953,7 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params) sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y); } - shm = e_comp_wl->wl.shm ?: ecore_wl_shm_get(); + shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(ewd); EINA_LIST_FOREACH(_outputs, l, output) { @@ -1258,31 +1258,19 @@ static Ecore_Event_Handler *wl_global_handler; static Eina_Bool _wl_init() { - Eina_Inlist *globals; - Ecore_Wl_Global *global; + Eina_Iterator *itr; + Ecore_Wl2_Global *global; struct wl_registry *reg; + void *data; - reg = e_comp_wl->wl.registry ?: ecore_wl_registry_get(); - if (e_comp_wl->wl.registry) - globals = e_comp_wl->wl.globals; - else - globals = ecore_wl_globals_get(); - if (!globals) + reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd); + itr = ecore_wl2_display_globals_get(ewd); + EINA_ITERATOR_FOREACH(itr, data) { -if (!wl_global_handler) - { - if (e_comp_wl->wl.registry) - wl_global_handler = ecore_event_handler_add(E_EVENT_WAYLAND_GLOBAL_ADD, - (Ecore_Event_Handler_Cb)_wl_init, NULL); - else - wl_global_handler = ecore_event_handler_add(ECORE_WL_EVENT_INTERFACES_BOUND, - (Ecore_Event_Handler_Cb)_wl_init, NULL); - } -return ECORE_CALLBACK_RENEW; - } - EINA_INLIST_FOREACH(globals, global) - { -if ((!_wl_screenshooter) && (!strcmp(global->interface, "screenshooter"))) +global = (Ecore_Wl2_Global *)data; + +if ((!_wl_screenshooter) && +(!strcmp(global->interface, "screenshooter"))) { _wl_screenshooter = wl_registry_bind(reg, global->id, @@ -1312,6 +1300,7 @@ _wl_init() } } } + return ECORE_CALLBACK_RENEW; } #endif --
[EGIT] [core/enlightenment] enlightenment-0.20 03/59: remove unused event loop and add external Ecore_Wl2_Display variable
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=5ff896f4bd025fdb73b39b58d06249ad23a42d26 commit 5ff896f4bd025fdb73b39b58d06249ad23a42d26 Author: Chris Michael Date: Thu Oct 22 11:54:59 2015 -0400 remove unused event loop and add external Ecore_Wl2_Display variable Signed-off-by: Chris Michael --- src/bin/e_comp_wl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index fd43b18..1493d14 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -103,7 +103,7 @@ struct _E_Comp_Wl_Data { struct wl_display *disp; struct wl_registry *registry; // only used for nested wl compositors -struct wl_event_loop *loop; +/* struct wl_event_loop *loop; */ Eina_Inlist *globals; // only used for nested wl compositors struct wl_shm *shm; // only used for nested wl compositors Evas_GL *gl; @@ -341,6 +341,8 @@ E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timest E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD; +E_API extern Ecore_Wl2_Display *ewd; + # ifndef HAVE_WAYLAND_ONLY EINTERN void e_comp_wl_xwayland_client_queue(E_Client *ec); static inline E_Comp_X_Client_Data * --
[EGIT] [core/enlightenment] enlightenment-0.20 32/59: do not set focus in wayland client show callback for cursor clients
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=3b77b7aa43dfa20309226d48567a12856a714f1c commit 3b77b7aa43dfa20309226d48567a12856a714f1c Author: Mike Blumenkrantz Date: Wed Jan 20 16:19:23 2016 -0500 do not set focus in wayland client show callback for cursor clients --- src/bin/e_comp_wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 09ec7a4..00fcebf 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -123,7 +123,7 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN if (!ec->override) e_hints_window_visible_set(ec); - if (!ec->ignored) + if ((!ec->ignored) && (!ec->comp_data->cursor)) { if (ec->new_client) ec->take_focus = !starting; --
[EGIT] [core/enlightenment] enlightenment-0.20 11/59: Fix formatting
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=c648775b9571d327b082c7f80b83084ee8e1f35a commit c648775b9571d327b082c7f80b83084ee8e1f35a Author: Chris Michael Date: Mon Oct 26 10:24:28 2015 -0400 Fix formatting Signed-off-by: Chris Michael --- src/bin/e_comp_wl_input.c | 60 +++ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 7e8f2e9..ec9d2e1 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -20,7 +20,7 @@ _e_comp_wl_input_update_seat_caps(void) caps |= WL_SEAT_CAPABILITY_TOUCH; EINA_LIST_FOREACH(e_comp_wl->seat.resources, l, res) -wl_seat_send_capabilities(res, caps); + wl_seat_send_capabilities(res, caps); } static void @@ -126,9 +126,13 @@ _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource) e_comp_wl->kbd.resources = eina_list_remove(e_comp_wl->kbd.resources, resource); EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res) - if (res == resource) - e_comp_wl->kbd.focused = - eina_list_remove_list(e_comp_wl->kbd.focused, l); + { +if (res == resource) + { + e_comp_wl->kbd.focused = + eina_list_remove_list(e_comp_wl->kbd.focused, l); + } + } } void @@ -169,8 +173,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r wl_resource_get_version(resource), id); if (!res) { -ERR("Could not create keyboard on seat %s: %m", -e_comp_wl->seat.name); +ERR("Could not create keyboard on seat %s: %m", e_comp_wl->seat.name); wl_client_post_no_memory(client); return; } @@ -187,8 +190,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r /* send current keymap */ wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, - e_comp_wl->xkb.fd, - e_comp_wl->xkb.size); + e_comp_wl->xkb.fd, e_comp_wl->xkb.size); /* if the client owns the focused surface, we need to send an enter */ focused = e_client_focused_get(); @@ -210,23 +212,23 @@ _e_comp_wl_input_cb_touch_unbind(struct wl_resource *resource) static void _e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id EINA_UNUSED) { -struct wl_resource *res; + struct wl_resource *res; /* try to create pointer resource */ -res = wl_resource_create(client, &wl_touch_interface, - wl_resource_get_version(resource), id); -if (!res) - { - ERR("Could not create touch on seat %s: %m", - e_comp_wl->seat.name); - wl_client_post_no_memory(client); - return; - } - -e_comp_wl->touch.resources = + res = wl_resource_create(client, &wl_touch_interface, +wl_resource_get_version(resource), id); + if (!res) + { +ERR("Could not create touch on seat %s: %m", +e_comp_wl->seat.name); +wl_client_post_no_memory(client); +return; + } + + e_comp_wl->touch.resources = eina_list_append(e_comp_wl->touch.resources, res); -wl_resource_set_implementation(res, &_e_touch_interface, - e_comp->wl_comp_data, + wl_resource_set_implementation(res, &_e_touch_interface, + e_comp->wl_comp_data, _e_comp_wl_input_cb_touch_unbind); } @@ -403,8 +405,7 @@ _e_comp_wl_input_keymap_update(struct xkb_keymap *keymap) /* send updated keymap */ EINA_LIST_FOREACH(e_comp_wl->kbd.resources, l, res) wl_keyboard_send_keymap(res, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, - e_comp_wl->xkb.fd, - e_comp_wl->xkb.size); + e_comp_wl->xkb.fd, e_comp_wl->xkb.size); /* update modifiers */ e_comp_wl_input_keyboard_modifiers_update(); @@ -501,23 +502,20 @@ e_comp_wl_input_keyboard_modifiers_serialize(void) xkb_mod_mask_t mod; xkb_layout_index_t grp; - mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, - XKB_STATE_DEPRESSED); + mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_DEPRESSED); changed |= mod != e_comp_wl->kbd.mod_depressed; e_comp_wl->kbd.mod_depressed = mod; - mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, - XKB_STATE_MODS_LATCHED); + mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, XKB_STATE_MODS_LATCHED); changed |= mod != e_comp_wl->kbd.mod_latched; e_comp_wl->kbd.mod_latched = mod; - mod = xkb_state_serialize_mods(e_comp_wl->xkb.state, -
[EGIT] [core/enlightenment] enlightenment-0.20 24/59: remove need_reparent, reparented, first_damage flags from wl client comp_data
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f1ccac37751625d203f2219f1e569823b3877900 commit f1ccac37751625d203f2219f1e569823b3877900 Author: Mike Blumenkrantz Date: Tue Jan 19 12:10:49 2016 -0500 remove need_reparent, reparented, first_damage flags from wl client comp_data these flags, and related code, have no functional purpose in wayland --- src/bin/e_comp_wl.c | 119 src/bin/e_comp_wl.h | 3 -- 2 files changed, 122 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index f6c81c0..a464af9 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -122,12 +122,6 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN if (!ec->override) e_hints_window_visible_set(ec); - if ((!ec->override) && (!ec->re_manage) && (!ec->comp_data->reparented) && - (!ec->comp_data->need_reparent)) - { -ec->comp_data->need_reparent = EINA_TRUE; -ec->visible = EINA_TRUE; - } if (!ec->ignored) { @@ -135,17 +129,6 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN EC_CHANGED(ec); } - if (!ec->comp_data->need_reparent) - { -if ((ec->hidden) || (ec->iconic)) - { - evas_object_hide(ec->frame); - e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); - } -else if (!ec->internal_elm_win) - evas_object_show(ec->frame); - } - EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) evas_object_show(tmp->frame); } @@ -700,11 +683,6 @@ _e_comp_wl_evas_cb_kill_request(void *data, Evas_Object *obj EINA_UNUSED, void * /* if (ec->netwm.ping) e_client_ping(ec); */ e_comp_ignore_win_del(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ec->pixmap)); - if (ec->comp_data) - { -if (ec->comp_data->reparented) - e_client_comp_hidden_set(ec, EINA_TRUE); - } evas_object_pass_events_set(ec->frame, EINA_TRUE); if (ec->visible) evas_object_hide(ec->frame); @@ -2236,9 +2214,6 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec) /* set initial client data properties */ ec->comp_data->mapped = EINA_FALSE; - ec->comp_data->first_damage = ec->internal; - - ec->comp_data->need_reparent = !ec->internal; /* add this client to the hash */ /* eina_hash_add(clients_win_hash, &win, ec); */ @@ -2254,16 +2229,6 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) /* make sure this is a wayland client */ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return; - if ((!ec->already_unparented) && (ec->comp_data->reparented)) - _e_comp_wl_focus_down_set(ec); - - ec->already_unparented = EINA_TRUE; - if (ec->comp_data->reparented) - { -/* reset pixmap parent window */ -e_pixmap_parent_window_set(ec->pixmap, 0); - } - /* remove sub list */ EINA_LIST_FREE(ec->comp_data->sub.list, subc) subc->comp_data->sub.data->parent = NULL; @@ -2289,87 +2254,6 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) _e_comp_wl_focus_check(); } -#if 0 -static void -_e_comp_wl_client_cb_pre_frame(void *data EINA_UNUSED, E_Client *ec) -{ - uint64_t parent; - - if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return; - if (!ec->comp_data->need_reparent) return; - - DBG("Client Pre Frame: %d", wl_resource_get_id(ec->comp_data->surface)); - - parent = e_client_util_pwin_get(ec); - - /* set pixmap parent window */ - e_pixmap_parent_window_set(ec->pixmap, parent); - - ec->border_size = 0; - ec->border.changed = EINA_TRUE; - ec->changes.shape = EINA_TRUE; - ec->changes.shape_input = EINA_TRUE; - EC_CHANGED(ec); - - if (ec->visible) - { -if ((ec->comp_data->set_win_type) && (ec->internal_elm_win)) - { - int type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; - - switch (ec->netwm.type) - { -case E_WINDOW_TYPE_DIALOG: - /* NB: If there is No transient set, then dialogs get - * treated as Normal Toplevel windows */ - if (ec->icccm.transient_for) -type = ECORE_WL_WINDOW_TYPE_TRANSIENT; - break; -case E_WINDOW_TYPE_DESKTOP: - type = ECORE_WL_WINDOW_TYPE_FULLSCREEN; - break; -case E_WINDOW_TYPE_DND: - type = ECORE_WL_WINDOW_TYPE_DND; - break; -case E_WINDOW_TYPE_MENU: -case E_WINDOW_TYPE_DROPDOWN_MENU: -case E_WINDOW_TYPE_POPUP_MENU: - type = ECORE_WL_WINDOW_TYPE_MENU; - break; -case E_WINDOW_TYPE_NORMAL: -default: -break; - } - -
[EGIT] [core/enlightenment] enlightenment-0.20 18/59: call ecore_wl2_shutdown() in wl compositor delete callback
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=e67f238c067cd274c04c5fa701fed3f4d6f1e326 commit e67f238c067cd274c04c5fa701fed3f4d6f1e326 Author: Mike Blumenkrantz Date: Wed Dec 23 12:25:10 2015 -0500 call ecore_wl2_shutdown() in wl compositor delete callback shutdown/restart crash-- --- src/bin/e_comp.c| 9 + src/bin/e_comp_wl.c | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 68c4e42..9facdd0 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -1370,26 +1370,19 @@ e_comp_shutdown(void) Eina_List *l, *ll; E_Client *ec; -#ifdef HAVE_WAYLAND - E_Pixmap_Type type = e_comp->comp_type; -#endif E_FREE_FUNC(action_timeout, ecore_timer_del); EINA_LIST_FOREACH_SAFE(e_comp->clients, l, ll, ec) { DELD(ec, 9); e_object_del(E_OBJECT(ec)); } + e_object_del(E_OBJECT(e_comp)); e_comp = NULL; E_FREE_LIST(handlers, ecore_event_handler_del); E_FREE_LIST(actions, e_object_del); E_FREE_LIST(hooks, e_client_hook_del); -#ifdef HAVE_WAYLAND - if (type == E_PIXMAP_TYPE_WL) - e_comp_wl_shutdown(); -#endif - gl_avail = EINA_FALSE; e_comp_cfdata_config_free(conf); E_CONFIG_DD_FREE(conf_match_edd); diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 52504de..1f5ff90 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1659,6 +1659,7 @@ _e_comp_wl_compositor_cb_del(void *data EINA_UNUSED) if (output->model) eina_stringshare_del(output->model); free(output); } + e_comp_wl_shutdown(); /* delete fd handler */ /* if (e_comp_wl->fd_hdlr) ecore_main_fd_handler_del(e_comp_wl->fd_hdlr); */ --
[EGIT] [core/enlightenment] enlightenment-0.20 38/59: check siginfo si_code to verify that SIGUSR2 comes from user
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=18d59156cc9dd4d8b469190e0162e533bdfb44c5 commit 18d59156cc9dd4d8b469190e0162e533bdfb44c5 Author: Chris Michael Date: Thu Jan 21 11:28:31 2016 -0500 check siginfo si_code to verify that SIGUSR2 comes from user When VT switching away and back, the kernel uses SIGUSR1 and SIGUSR2 to notify us of a vt switch event. That same signal was being trapped here to toggle display of the 'fps' window. If we check the signal's si_code, we can tell if this signal came from the kernel (as in vt switch) or from the user (as is sent in 'kill'). This fixes the issue of VT-switching back and forth under DRM would cause the compositor 'fps' display to appear. Signed-off-by: Chris Michael --- src/bin/e_comp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 9facdd0..4bce85d 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -817,6 +817,12 @@ _e_comp_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Key * static Eina_Bool _e_comp_signal_user(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Event_Signal_User *ev) { + siginfo_t sig; + + sig = ev->data; + /* anything sent via 'kill' will set this code to SI_USER */ + if (sig.si_code != SI_USER) return ECORE_CALLBACK_PASS_ON; + if (ev->number == 1) { // e uses this to pop up config panel --
[EGIT] [core/enlightenment] enlightenment-0.20 08/59: Don't leak eina_iterator in shot module
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=58c7122aafbf77736da2ec8c30477f10785bb99d commit 58c7122aafbf77736da2ec8c30477f10785bb99d Author: Chris Michael Date: Mon Oct 26 10:03:33 2015 -0400 Don't leak eina_iterator in shot module Signed-off-by: Chris Michael --- src/modules/shot/e_mod_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index 60919b0..85d61f7 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -1300,6 +1300,7 @@ _wl_init() } } } + eina_iterator_free(itr); return ECORE_CALLBACK_RENEW; } --
[EGIT] [core/enlightenment] enlightenment-0.20 13/59: Try to init (and error check the init) of ecore_wl2 library before we create a compositor
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=be2221ed9542ac54bc27bee90a3d0ed051c2aca7 commit be2221ed9542ac54bc27bee90a3d0ed051c2aca7 Author: Chris Michael Date: Mon Dec 7 09:25:49 2015 -0500 Try to init (and error check the init) of ecore_wl2 library before we create a compositor ref T2919 Signed-off-by: Chris Michael --- src/bin/e_comp_wl.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index de5eb6e..4fee9dc 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2735,6 +2735,13 @@ _e_comp_wl_gl_init(void *d EINA_UNUSED) E_API Eina_Bool e_comp_wl_init(void) { + /* try to init ecore_wayland */ + if (!ecore_wl2_init()) + { +e_error_message_show(_("Enlightenment cannot initialize Ecore_Wl2!\n")); +return EINA_FALSE; + } + /* set gl available if we have ecore_evas support */ if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_EGL) || ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_DRM)) @@ -2747,13 +2754,6 @@ e_comp_wl_init(void) return EINA_FALSE; } - /* try to init ecore_wayland */ - if (!ecore_wl2_init()) - { -e_error_message_show(_("Enlightenment cannot initialize Ecore_Wl2!\n")); -return EINA_FALSE; - } - /* create hash to store clients */ /* clients_win_hash = eina_hash_int64_new(NULL); */ --
[EGIT] [core/enlightenment] enlightenment-0.20 22/59: e_comp_wl: only ignore ignored clients
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=a928205be41e8b519c104413ada95f5743ec1c2e commit a928205be41e8b519c104413ada95f5743ec1c2e Author: Marcel Hollerbach Date: Sun Jan 17 15:32:43 2016 +0100 e_comp_wl: only ignore ignored clients a override client (in terms of override like x) should get focus, which would not happen for the case of the function call. --- src/bin/e_comp_wl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index b9012e7..f6c81c0 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -128,7 +128,8 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN ec->comp_data->need_reparent = EINA_TRUE; ec->visible = EINA_TRUE; } - if (!e_client_util_ignored_get(ec)) + + if (!ec->ignored) { ec->take_focus = !starting; EC_CHANGED(ec); --
[EGIT] [core/enlightenment] enlightenment-0.20 53/59: disable shelf shadows if "noshadow" data item exists in shelf theme
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=5919d6ae7c94df09eafe818cff75136708491ef7 commit 5919d6ae7c94df09eafe818cff75136708491ef7 Author: Mike Blumenkrantz Date: Mon Jan 25 12:36:21 2016 -0500 disable shelf shadows if "noshadow" data item exists in shelf theme this used to be handled by the "shaped" flag back when shelves had their own windows, but the handling for it was lost during the transition away from the E18 compositor --- src/bin/e_shelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_shelf.c b/src/bin/e_shelf.c index 3198b83..c1b5ca6 100644 --- a/src/bin/e_shelf.c +++ b/src/bin/e_shelf.c @@ -252,7 +252,7 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, E_Layer laye e_shelf_style_set(es, style); evas_object_move(es->o_base, es->zone->x + es->x, es->zone->y + es->y); - if (layer == E_LAYER_DESKTOP) + if ((layer == E_LAYER_DESKTOP) || edje_object_data_get(es->o_base, "noshadow")) type = E_COMP_OBJECT_TYPE_NONE; es->comp_object = e_comp_object_util_add(es->o_base, type); evas_object_event_callback_add(es->comp_object, EVAS_CALLBACK_HIDE, _e_shelf_hidden, es); --
[EGIT] [core/enlightenment] enlightenment-0.20 19/59: create wl client connection during compositor init, use in shot module
discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=dfa9b45044aa6384ba6ab8db29841f745bb8414d commit dfa9b45044aa6384ba6ab8db29841f745bb8414d Author: Mike Blumenkrantz Date: Sat Dec 5 13:09:03 2015 -0500 create wl client connection during compositor init, use in shot module fixes shot module ref T2919 --- src/bin/e_comp_wl.c | 1 + src/bin/e_comp_wl.h | 1 + src/modules/shot/e_mod_main.c | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 1f5ff90..b9012e7 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2658,6 +2658,7 @@ _e_comp_wl_compositor_create(void) e_comp_wl_input_keymap_set(rules, model, layout); } #endif + e_comp_wl->wl.client_disp = ecore_wl2_display_connect(NULL); /* setup module idler to load shell mmodule */ ecore_idler_add(_e_comp_wl_cb_module_idle, cdata); diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 41dcdae..893c490 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -104,6 +104,7 @@ struct _E_Comp_Wl_Data struct { struct wl_display *disp; +Ecore_Wl2_Display *client_disp; struct wl_registry *registry; // only used for nested wl compositors /* struct wl_event_loop *loop; */ Eina_Inlist *globals; // only used for nested wl compositors diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c index 85d61f7..0174bbb 100644 --- a/src/modules/shot/e_mod_main.c +++ b/src/modules/shot/e_mod_main.c @@ -953,7 +953,7 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params) sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y); } - shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(ewd); + shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(e_comp_wl->wl.client_disp); EINA_LIST_FOREACH(_outputs, l, output) { @@ -1263,8 +1263,8 @@ _wl_init() struct wl_registry *reg; void *data; - reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd); - itr = ecore_wl2_display_globals_get(ewd); + reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(e_comp_wl->wl.client_disp); + itr = ecore_wl2_display_globals_get(e_comp_wl->wl.client_disp); EINA_ITERATOR_FOREACH(itr, data) { global = (Ecore_Wl2_Global *)data; --
[EGIT] [bindings/python/python-efl] master 01/01: Elm.MultiButtonEntry: Fix filter callback
kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=523fe8ad4dc3e271586ade9972faec24a69e0a2c commit 523fe8ad4dc3e271586ade9972faec24a69e0a2c Author: Kai Huuhko Date: Tue Feb 2 21:23:02 2016 +0200 Elm.MultiButtonEntry: Fix filter callback --- efl/elementary/multibuttonentry.pxi | 31 ++-- efl/elementary/multibuttonentry_cdef.pxi | 2 +- examples/elementary/test_multibuttonentry.py | 15 +++--- 3 files changed, 14 insertions(+), 34 deletions(-) diff --git a/efl/elementary/multibuttonentry.pxi b/efl/elementary/multibuttonentry.pxi index 13c28e3..8c6e272 100644 --- a/efl/elementary/multibuttonentry.pxi +++ b/efl/elementary/multibuttonentry.pxi @@ -18,45 +18,26 @@ include "multibuttonentry_cdef.pxi" -class MultiButtonEntryFilterOut(Exception): -"""An exception you may raise in an item filter callback if you wish to prevent addition of the item""" -pass - cdef Eina_Bool _multibuttonentry_filter_callback(Evas_Object *obj, \ -char *item_label, void *item_data, void *data) with gil: +const char *item_label, void *item_data, void *data) with gil: cdef: MultiButtonEntry mbe = object_from_instance(obj) -object ret +bint ret list callbacks = mbe._item_filters for func, args, kargs in callbacks: try: -# raise MultiButtonEntryFilterOut -> cancels item add -# ret is None -> no change, continue to next filter -# ret is not None -> change label to value of ret, continue to next filter ret = func(mbe, _ctouni(item_label), *args, **kargs) -except MultiButtonEntryFilterOut: -#free(item_label) # FIXME: This will result in a double free, find out if it's bad elm documentation - #or wrong ref handling on our side. - -#item_label = NULL -return 0 except Exception: traceback.print_exc() continue if ret: -if not isinstance(ret, basestring): -EINA_LOG_DOM_WARN(PY_EFL_ELM_LOG_DOMAIN, -"Ignoring invalid return value from MultiButtonEntry item filter callback!", NULL) -continue -if isinstance(ret, unicode): ret = PyUnicode_AsUTF8String(ret) -#free(item_label) # FIXME: This will result in a double free, find out if it's bad elm documentation - #or wrong ref handling on our side. - -item_label = strdup(ret) # Elm will manage the string - # FIXME: This doesn't apply, why? +continue +else: +return 0 # This emulates the behavior of C code where callbacks + # are iterated until EINA_FALSE is returned by user return 1 diff --git a/efl/elementary/multibuttonentry_cdef.pxi b/efl/elementary/multibuttonentry_cdef.pxi index 5b2aa34..f8b8218 100644 --- a/efl/elementary/multibuttonentry_cdef.pxi +++ b/efl/elementary/multibuttonentry_cdef.pxi @@ -1,6 +1,6 @@ cdef extern from "Elementary.h": -ctypedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_Cb)(Evas_Object *obj, char *item_label, void *item_data, void *data) +ctypedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_Cb)(Evas_Object *obj, const char *item_label, void *item_data, void *data) ctypedef char * (*Elm_Multibuttonentry_Format_Cb)(int count, void *data) Evas_Object *elm_multibuttonentry_add(Evas_Object *parent) diff --git a/examples/elementary/test_multibuttonentry.py b/examples/elementary/test_multibuttonentry.py index 989598f..59681c4 100644 --- a/examples/elementary/test_multibuttonentry.py +++ b/examples/elementary/test_multibuttonentry.py @@ -6,7 +6,7 @@ from efl import elementary from efl.elementary import StandardWindow from efl.elementary import Box from efl.elementary import Button -from efl.elementary import MultiButtonEntry, MultiButtonEntryFilterOut +from efl.elementary import MultiButtonEntry from efl.elementary import Scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO SCROLL_POLICY_VERT = ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO @@ -55,13 +55,13 @@ def cb_btn_clear2(btn, mbe): def cb_filter1(mbe, text): print(text) +return True def cb_filter2(mbe, text): -return text[:-2] - -def cb_filter3(mbe, text): -print(text) -#raise MultiButtonEntryFilterOut +if text == "nope": +return False +else: +return True def cb_print(btn, mbe): for i in mbe.items: @@ -86,10 +86,9 @@ def multibuttonentry_clicked(obj, item=None): mbe.callback_item_selected_add(cb_item_selected) mbe.callback_item_clicked_add(cb_item_clicked) mbe.callback_item_longpressed_add(cb_item_longpressed) -mbe.part_text_set("guide", "Tap to add recipient") +mbe.part_text_set("guide", "
[EGIT] [core/elementary] master 03/10: scroller: prevent the use of uninitialized data in some case.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=4c53dbbd98a48b3e94aa84622c4d30a24e26b5f0 commit 4c53dbbd98a48b3e94aa84622c4d30a24e26b5f0 Author: Cedric BAIL Date: Tue Jan 26 15:51:19 2016 -0800 scroller: prevent the use of uninitialized data in some case. --- src/lib/elm_scroller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c index 04c95a0..29edd35 100644 --- a/src/lib/elm_scroller.c +++ b/src/lib/elm_scroller.c @@ -60,7 +60,7 @@ static void _elm_scroller_proxy_set(Evas_Object *obj, Elm_Scroller_Data *sd, Evas_Object *proxy) { Evas_Coord h_pagesize, v_pagesize; - Evas_Coord cw, ch; + Evas_Coord cw = 0, ch = 0; Evas_Object *content = sd->content; if (!content) return; --
[EGIT] [core/elementary] master 10/10: genlist: make automatic bounce test configurable.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=14081f508ca676c102f7f480760555a243b11ac4 commit 14081f508ca676c102f7f480760555a243b11ac4 Author: Cedric BAIL Date: Mon Feb 1 16:02:56 2016 -0800 genlist: make automatic bounce test configurable. --- src/bin/test_genlist.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c index b9d84b1..ff64002 100644 --- a/src/bin/test_genlist.c +++ b/src/bin/test_genlist.c @@ -39,6 +39,8 @@ enum _api_state }; typedef enum _api_state api_state; +static int bounce_max = 50; + static void set_api_state(api_data *api) { @@ -299,7 +301,7 @@ _bounce_cb(void *data) elm_genlist_item_bring_in(bounce->it2, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); else elm_genlist_item_bring_in(bounce->it1, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); - if (bounce->state > 50) + if (bounce->state > bounce_max) { if (getenv("ELM_TEST_AUTOBOUNCE")) elm_exit(); } @@ -414,7 +416,11 @@ test_genlist(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i evas_object_event_callback_add(bt, EVAS_CALLBACK_DEL, _btdel_cb, bounce); max = 2000; - if (getenv("ELM_TEST_AUTOBOUNCE")) max = 200; + if (getenv("ELM_TEST_AUTOBOUNCE")) + { +max = 200; +bounce_max = atoi(getenv("ELM_TEST_AUTOBOUNCE")); + } for (i = 0; i < max; i++) { gli = elm_genlist_item_append(gl, api->itc1, --
[EGIT] [core/elementary] master 08/10: genlist: switch to efl.core.animator tick.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=770bc8314841bb0634afecf107054729cebde368 commit 770bc8314841bb0634afecf107054729cebde368 Author: Cedric BAIL Date: Thu Jan 28 17:07:34 2016 -0800 genlist: switch to efl.core.animator tick. --- src/lib/elm_genlist.c| 78 src/lib/elm_widget_genlist.h | 3 +- 2 files changed, 51 insertions(+), 30 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 538e954..914bb1c 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -160,6 +160,9 @@ static void _decorate_item_set(Elm_Gen_Item *); static void _internal_elm_genlist_clear(Evas_Object *obj); static Eina_Bool _item_filtered_get(Elm_Gen_Item *it); +static void _elm_genlist_tree_effect_stop(Elm_Genlist_Data *sd); +static Eina_Bool _elm_genlist_tree_effect_setup(Elm_Genlist_Data *sd); + static const Elm_Action key_actions[] = { {"move", _key_action_move}, {"select", _key_action_select}, @@ -1142,7 +1145,7 @@ _item_tree_effect_finish(Elm_Genlist_Data *sd) (ELM_GENLIST_EVENT_TREE_EFFECT_FINISHED, NULL)); evas_object_smart_changed(sd->pan_obj); - sd->tree_effect_animator = NULL; + _elm_genlist_tree_effect_stop(sd); } static void @@ -1974,7 +1977,10 @@ _item_realize(Elm_Gen_Item *it, } static Eina_Bool -_tree_effect_animator_cb(void *data) +_tree_effect_animator_cb(void *data, + Eo *obj EINA_UNUSED, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info EINA_UNUSED) { int in = 0; const Eina_List *l; @@ -2127,10 +2133,10 @@ _tree_effect_animator_cb(void *data) if (end) { _item_tree_effect_finish(sd); -return ECORE_CALLBACK_CANCEL; +_elm_genlist_tree_effect_stop(sd); } - return ECORE_CALLBACK_RENEW; + return EO_CALLBACK_CONTINUE; } static void @@ -2386,6 +2392,37 @@ _item_block_realize(Item_Block *itb) itb->want_unrealize = EINA_FALSE; } +static Eina_Bool +_elm_genlist_tree_effect_setup(Elm_Genlist_Data *sd) +{ + if (!sd->tree_effect_animator) + { +Eina_Bool r; + +_item_tree_effect_before(sd->expanded_item); +evas_object_raise(sd->event_block_rect); +evas_object_stack_below(sd->event_block_rect, sd->stack[1]); +evas_object_show(sd->event_block_rect); +sd->start_time = ecore_time_get(); +eo_do(sd->obj, + r = eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _tree_effect_animator_cb, sd->obj)); +sd->tree_effect_animator = 1; +return EINA_TRUE; + } + return EINA_FALSE; +} + +static void +_elm_genlist_tree_effect_stop(Elm_Genlist_Data *sd) +{ + if (sd->tree_effect_animator) + { +sd->tree_effect_animator = 0; +eo_do(sd->obj, + eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _tree_effect_animator_cb, sd->obj)); + } +} + EOLIAN static void _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd) { @@ -2414,16 +2451,7 @@ _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd) if (sd->tree_effect_enabled && (sd->move_effect_mode != ELM_GENLIST_TREE_EFFECT_NONE)) { -if (!sd->tree_effect_animator) - { - _item_tree_effect_before(sd->expanded_item); - evas_object_raise(sd->event_block_rect); - evas_object_stack_below(sd->event_block_rect, sd->stack[1]); - evas_object_show(sd->event_block_rect); - sd->start_time = ecore_time_get(); - sd->tree_effect_animator = - ecore_animator_add(_tree_effect_animator_cb, sd->obj); - } +_elm_genlist_tree_effect_setup(sd); } EINA_INLIST_FOREACH(sd->blocks, itb) @@ -3693,7 +3721,7 @@ _item_del(Elm_Gen_Item *it) if (sd->tree_effect_animator) { _item_tree_effect_finish(sd); - ELM_SAFE_FREE(sd->tree_effect_animator, ecore_animator_del); + _elm_genlist_tree_effect_stop(sd); } sd->expanded_item = NULL; sd->move_effect_mode = ELM_GENLIST_TREE_EFFECT_NONE; @@ -5570,7 +5598,8 @@ _elm_genlist_evas_object_smart_del(Eo *obj, Elm_Genlist_Data *sd) ecore_idler_del(sd->must_recalc_idler); ecore_timer_del(sd->multi_timer); eina_stringshare_del(sd->decorate_it_type); - ecore_animator_del(sd->tree_effect_animator); + + _elm_genlist_tree_effect_stop(sd); eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); } @@ -5713,11 +5742,12 @@ _internal_elm_genlist_clear(Evas_Object *obj) elm_layout_sizing_eval(sd->obj); eo_do(obj, elm_interface_scrollable_content_region_show(0, 0, 0, 0)); + _elm_genlist_tree_effect_stop(sd); + ELM_SAFE_FREE(sd->multi_timer, ecore_timer_del); ELM_SAFE_FREE(sd->update_job, eco
[EGIT] [core/elementary] master 09/10: naviframe: switch to use animator, tick.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=1e68c7b3198098faf1b0b0b25054a5e72743fe63 commit 1e68c7b3198098faf1b0b0b25054a5e72743fe63 Author: Cedric BAIL Date: Sat Jan 30 00:47:38 2016 +0100 naviframe: switch to use animator,tick. --- src/lib/elc_naviframe.c| 33 +++-- src/lib/elm_widget_naviframe.h | 2 +- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index dd53d87..9b616e3 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -1419,7 +1419,10 @@ _send_signal(Elm_Naviframe_Item_Data *it, const char *sig) } static Eina_Bool -_deferred(void *data) +_deferred(void *data, + Eo *o EINA_UNUSED, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info EINA_UNUSED) { Elm_Naviframe_Data *nfd = data; Elm_Naviframe_Op *nfo; @@ -1444,8 +1447,9 @@ _deferred(void *data) free(nfo); } - nfd->animator = NULL; - return ECORE_CALLBACK_CANCEL; + eo_do(nfd->obj, + eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _deferred, nfd)); + return EO_CALLBACK_CONTINUE; } EOLIAN static void @@ -1462,8 +1466,7 @@ _elm_naviframe_evas_object_smart_del(Eo *obj, Elm_Naviframe_Data *sd) eo_do(EO_OBJ(it), elm_wdg_item_del()); } - //All popping items which are not called yet by animator. - if (sd->animator) ecore_animator_del(sd->animator); + // No need to cleanup animator as it is an event on myself EINA_LIST_FREE(sd->ops, nfo) free(nfo); EINA_LIST_FREE(sd->popping, it) @@ -1527,6 +1530,16 @@ _elm_naviframe_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Ei } static void +_schedule_deferred(Elm_Naviframe_Op *nfo, Elm_Naviframe_Data *sd) +{ + if (!sd->ops) + eo_do(sd->obj, + eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _deferred, sd)); + + sd->ops = eina_list_append(sd->ops, nfo); +} + +static void _item_push_helper(Elm_Naviframe_Item_Data *item) { Elm_Object_Item *eo_top_item; @@ -1559,8 +1572,7 @@ _item_push_helper(Elm_Naviframe_Item_Data *item) nfo->related = top_item; nfo->push = EINA_TRUE; -sd->ops = eina_list_append(sd->ops, nfo); -if (!sd->animator) sd->animator = ecore_animator_add(_deferred, sd); +_schedule_deferred(nfo, sd); item->pushing = EINA_TRUE; } else @@ -1588,9 +1600,10 @@ elm_naviframe_add(Evas_Object *parent) } EOLIAN static Eo * -_elm_naviframe_eo_base_constructor(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED) +_elm_naviframe_eo_base_constructor(Eo *obj, Elm_Naviframe_Data *sd) { obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); + sd->obj = obj; eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY), evas_obj_smart_callbacks_descriptions_set(_smart_callbacks), @@ -1778,8 +1791,8 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd) nfo->push = EINA_FALSE; sd->popping = eina_list_append(sd->popping, it); -sd->ops = eina_list_append(sd->ops, nfo); -if (!sd->animator) sd->animator = ecore_animator_add(_deferred, sd); + +_schedule_deferred(nfo, sd); } else eo_do(eo_item, elm_wdg_item_del()); diff --git a/src/lib/elm_widget_naviframe.h b/src/lib/elm_widget_naviframe.h index 0bc5264..249bf08 100644 --- a/src/lib/elm_widget_naviframe.h +++ b/src/lib/elm_widget_naviframe.h @@ -26,11 +26,11 @@ typedef struct _Elm_Naviframe_Data Elm_Naviframe_Data; struct _Elm_Naviframe_Data { + Evas_Object *obj; /* the object itself */ Eina_Inlist *stack; /* top item is the list's LAST item */ Eina_List*popping; Eina_List*ops; Evas_Object *dummy_edje; - Ecore_Animator *animator; Evas_Display_Mode dispmode; Eina_Bool preserve : 1; --
[EGIT] [core/elementary] master 07/10: tests: switch anim test to Efl.Core.Animator tick.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=9ad6c1b7a04c4f0f7eeaaf7fb94c8887f16b0e25 commit 9ad6c1b7a04c4f0f7eeaaf7fb94c8887f16b0e25 Author: Cedric BAIL Date: Thu Jan 28 17:05:08 2016 -0800 tests: switch anim test to Efl.Core.Animator tick. --- src/bin/test_anim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/test_anim.c b/src/bin/test_anim.c index 2eb07d6..6d6cd39 100644 --- a/src/bin/test_anim.c +++ b/src/bin/test_anim.c @@ -93,5 +93,5 @@ test_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info evas_object_resize(win, 480, 800); evas_object_show(win); - eo_do(win, eo_event_callback_add(ELM_WIN_EVENT_ANIMATOR_TICK, _anim_tick, NULL)); + eo_do(win, eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _anim_tick, NULL)); } --
[EGIT] [core/elementary] master 04/10: interface_scrollable: drop use of ecore_animator in favor of efl.core.animator tick
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=43740741bcfe129af71e4d7718beaa2205e2276d commit 43740741bcfe129af71e4d7718beaa2205e2276d Author: Cedric BAIL Date: Tue Jan 26 15:51:49 2016 -0800 interface_scrollable: drop use of ecore_animator in favor of efl.core.animator tick --- src/lib/elm_interface_scrollable.c | 192 - src/lib/elm_interface_scrollable.h | 13 +-- 2 files changed, 111 insertions(+), 94 deletions(-) diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index ab2db63..37451bc 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -30,6 +30,17 @@ return val; \ } +#define ELM_ANIMATOR_CONNECT(Obj, Bool, Callback, Data) \ + eo_do(Obj,\ +eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, Callback, Data), \ +eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, Callback, Data)); \ + Bool = 1; + +#define ELM_ANIMATOR_DISCONNECT(Obj, Bool, Callback, Data) \ + eo_do(Obj,\ +eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, Callback, Data)); \ + Bool = 0; + static const char SIG_CHANGED[] = "changed"; static const Evas_Smart_Cb_Description _smart_callbacks[] = { {SIG_CHANGED, ""}, @@ -49,6 +60,15 @@ static void _elm_scroll_wanted_coordinates_update(Elm_Scrollable_Smart_Interface_Data *sid, Evas_Coord x, Evas_Coord y); + +static Eina_Bool _elm_scroll_hold_animator(void *data, Eo *o, const Eo_Event_Description *desc, void *event_info); +static Eina_Bool _elm_scroll_on_hold_animator(void *data, Eo *o, const Eo_Event_Description *desc, void *event_info); +static Eina_Bool _elm_scroll_scroll_to_y_animator(void *data, Eo *o, const Eo_Event_Description *desc, void *event_info); +static Eina_Bool _elm_scroll_scroll_to_x_animator(void *data, Eo *o, const Eo_Event_Description *desc, void *event_info); +static Eina_Bool _elm_scroll_bounce_y_animator(void *data, Eo *o, const Eo_Event_Description *desc, void *event_info); +static Eina_Bool _elm_scroll_bounce_x_animator(void *data, Eo *o, const Eo_Event_Description *desc, void *event_info); +static Eina_Bool _elm_scroll_momentum_animator(void *data, Eo *o, const Eo_Event_Description *desc, void *event_info); + static double _round(double value, int pos) { @@ -1269,7 +1289,7 @@ _elm_scroll_momentum_end(Elm_Scrollable_Smart_Interface_Data *sid) eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&px, &py)); _elm_scroll_wanted_coordinates_update(sid, px, py); -ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del); +ELM_ANIMATOR_DISCONNECT(sid->obj, sid->down.momentum_animator, _elm_scroll_momentum_animator, sid); sid->down.bounce_x_hold = EINA_FALSE; sid->down.bounce_y_hold = EINA_FALSE; sid->down.ax = 0; @@ -1284,7 +1304,7 @@ _elm_scroll_momentum_end(Elm_Scrollable_Smart_Interface_Data *sid) } static Eina_Bool -_elm_scroll_bounce_x_animator(void *data) +_elm_scroll_bounce_x_animator(void *data, Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { ELM_SCROLL_IFACE_DATA_GET_OR_RETURN_VAL(data, sid, EINA_FALSE); Evas_Coord x, y, dx, w, odx, ed, md; @@ -1327,20 +1347,19 @@ _elm_scroll_bounce_x_animator(void *data) if ((!sid->down.bounce_y_animator) && (!sid->scrollto.y.animator)) _elm_scroll_anim_stop(sid); - sid->down.bounce_x_animator = NULL; sid->down.pdx = 0; sid->bouncemex = EINA_FALSE; _elm_scroll_momentum_end(sid); if (sid->content_info.resized) _elm_scroll_wanted_region_set(sid->obj); - return ECORE_CALLBACK_CANCEL; + ELM_ANIMATOR_CONNECT(sid->obj, sid->down.bounce_x_animator, _elm_scroll_bounce_x_animator, sid->obj); } } - return ECORE_CALLBACK_RENEW; + return EO_CALLBACK_CONTINUE; } static Eina_Bool -_elm_scroll_bounce_y_animator(void *data) +_elm_scroll_bounce_y_animator(void *data, Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED) { ELM_SCROLL_IFACE_DATA_GET_OR_RETURN_VAL(data, sid, EINA_FALSE); Evas_Coord x, y, dy, h, ody, ed, md; @@ -1383,17 +1402,16 @@ _elm_scroll_bounce_y_animator(void *data) if ((!sid->down.bounce_x_animator) && (!sid->scrollto.y.animator)) _elm_scroll_anim_stop(sid); - sid->down.bounce_y_animator = NULL; sid->down.pdy = 0; sid->bouncemey = EINA_FALSE;
[EGIT] [core/elementary] master 05/10: photocam: switch to use efl.core.animator.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=1a80a9d4f922a494bbbdd7e60ed89255a8476f21 commit 1a80a9d4f922a494bbbdd7e60ed89255a8476f21 Author: Cedric BAIL Date: Tue Jan 26 16:13:23 2016 -0800 photocam: switch to use efl.core.animator. --- src/lib/elm_photocam.c| 172 -- src/lib/elm_widget_photocam.h | 2 - 2 files changed, 83 insertions(+), 91 deletions(-) diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c index 991de5a..97d878e 100644 --- a/src/lib/elm_photocam.c +++ b/src/lib/elm_photocam.c @@ -766,10 +766,12 @@ _zoom_do(Evas_Object *obj, } static Eina_Bool -_zoom_anim_cb(void *data) +_zoom_anim_cb(void *data, + Eo *o EINA_UNUSED, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info EINA_UNUSED) { double t; - Eina_Bool go; Evas_Object *obj = data; ELM_PHOTOCAM_DATA_GET(obj, sd); @@ -783,16 +785,16 @@ _zoom_anim_cb(void *data) t = 1.0; t = 1.0 - t; t = 1.0 - (t * t); - go = _zoom_do(obj, t); - if (!go) + if (!_zoom_do(obj, t)) { sd->no_smooth--; if (!sd->no_smooth) _smooth_update(data); -sd->zoom_animator = NULL; +eo_do(obj, + eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj)); eo_do(obj, eo_event_callback_call(EVAS_ZOOMABLE_INTERFACE_EVENT_ZOOM_STOP, NULL)); } - return go; + return EO_CALLBACK_CONTINUE; } static Eina_Bool @@ -1037,8 +1039,11 @@ _elm_photocam_elm_widget_event(Eo *obj, Elm_Photocam_Data *_pd EINA_UNUSED, Evas return EINA_TRUE; } -Eina_Bool -_bounce_eval(void *data) +static Eina_Bool +_bounce_eval(void *data, + Eo *o EINA_UNUSED, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info EINA_UNUSED) { Evas_Object *obj = data; ELM_PHOTOCAM_DATA_GET(obj, sd); @@ -1046,16 +1051,7 @@ _bounce_eval(void *data) if ((sd->g_layer_zoom.imx == sd->g_layer_zoom.bounce.x_end) && (sd->g_layer_zoom.imy == sd->g_layer_zoom.bounce.y_end)) - { -sd->g_layer_zoom.imx = 0; -sd->g_layer_zoom.imy = 0; -sd->zoom_g_layer = EINA_FALSE; -sd->g_layer_zoom.bounce.animator = NULL; - -eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); - -return ECORE_CALLBACK_CANCEL; - } + goto on_end; t = ecore_loop_time_get(); tt = (t - sd->g_layer_zoom.bounce.t_start) / @@ -1066,15 +1062,8 @@ _bounce_eval(void *data) if (t > sd->g_layer_zoom.bounce.t_end) { -sd->g_layer_zoom.imx = 0; -sd->g_layer_zoom.imy = 0; -sd->zoom_g_layer = EINA_FALSE; - -eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); - _zoom_do(obj, 1.0); -sd->g_layer_zoom.bounce.animator = NULL; -return ECORE_CALLBACK_CANCEL; +goto on_end; } if (sd->g_layer_zoom.imx != sd->g_layer_zoom.bounce.x_end) @@ -1089,7 +1078,44 @@ _bounce_eval(void *data) _zoom_do(obj, 1.0 - (1.0 - tt)); - return ECORE_CALLBACK_RENEW; + return EO_CALLBACK_CONTINUE; + + on_end: + sd->g_layer_zoom.imx = 0; + sd->g_layer_zoom.imy = 0; + sd->zoom_g_layer = EINA_FALSE; + + eo_do(obj, elm_interface_scrollable_freeze_set(EINA_FALSE)); + + eo_do(obj, + eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _bounce_eval, obj)); + return EO_CALLBACK_CONTINUE; +} + +static void +_elm_photocam_bounce_reset(Eo *obj, Elm_Photocam_Data *sd EINA_UNUSED) +{ + Eina_Bool r; + + eo_do(obj, + r = eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _bounce_eval, obj)); + if (r) _zoom_do(obj, 1.0); +} + +static void +_elm_photocam_zoom_reset(Eo *obj, Elm_Photocam_Data *sd) +{ + Eina_Bool r; + + eo_do(obj, + r = eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _zoom_anim_cb, obj)); + if (r) + { +sd->no_smooth--; +if (!sd->no_smooth) _smooth_update(obj); +_zoom_do(obj, 1.0); +eo_do(obj, eo_event_callback_call(EVAS_ZOOMABLE_INTERFACE_EVENT_ZOOM_STOP, NULL)); + } } static void @@ -1165,7 +1191,7 @@ _g_layer_zoom_start_cb(void *data, Evas_Coord rw = 0, rh = 0; int x, y, w, h; - ELM_SAFE_FREE(sd->g_layer_zoom.bounce.animator, ecore_animator_del); + _elm_photocam_bounce_reset(obj, sd); sd->zoom_g_layer = EINA_TRUE; eo_do(obj, elm_interface_scrollable_freeze_set(EINA_TRUE)); @@ -1287,8 +1313,8 @@ _g_layer_zoom_end_cb(void *data, sd->g_layer_zoom.bounce.t_end = t + _elm_config->page_scroll_friction; -sd->g_layer_zoom.bounce.animator = - ecore_animator_add(_bounce_eval, obj); +eo_do(obj, + eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _bounce_eval, obj)); } else { @@ -1457,8 +1483,9 @@ _elm_photocam_evas_object_
[EGIT] [core/elementary] master 01/10: win: remove animator,tick.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=e00b4be2984fbec1011cb686d6d72a69c974876f commit e00b4be2984fbec1011cb686d6d72a69c974876f Author: Cedric BAIL Date: Tue Jan 26 14:07:29 2016 -0800 win: remove animator,tick. --- src/lib/elm_win.c | 61 -- src/lib/elm_win.eo | 1 - 2 files changed, 62 deletions(-) diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index ad009b0..a3d139e 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -208,12 +208,6 @@ struct _Elm_Win_Data void *trap_data; - struct - { -Ecore_Animator *obj; -unsigned short wants; - } animator; - double aspect; int size_base_w, size_base_h; int size_step_w, size_step_h; @@ -3337,59 +3331,6 @@ _accel_is_gl(void) return EINA_FALSE; } -static Eina_Bool -_animator_tick_cb(void *_obj) -{ - Elm_Win *obj = _obj; - eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_ANIMATOR_TICK, NULL)); - - return ECORE_CALLBACK_RENEW; -} - -static Eina_Bool -_cb_added(void *_data, - Eo *obj, - const Eo_Event_Description *desc EINA_UNUSED, - void *event_info) -{ - const Eo_Callback_Array_Item *event = event_info; - Elm_Win_Data *data = _data; - - if (event->desc == ELM_WIN_EVENT_ANIMATOR_TICK) - { -data->animator.wants++; -if (data->animator.wants == 1) - { - data->animator.obj = eo_add(ECORE_ANIMATOR_CLASS, obj, - ecore_animator_constructor(_animator_tick_cb, obj)); - } - } - - return EO_CALLBACK_CONTINUE; -} - -static Eina_Bool -_cb_deled(void *_data, - Eo *obj EINA_UNUSED, - const Eo_Event_Description *desc EINA_UNUSED, - void *event_info) -{ - const Eo_Callback_Array_Item *event = event_info; - Elm_Win_Data *data = _data; - - if (event->desc == ELM_WIN_EVENT_ANIMATOR_TICK) - { -data->animator.wants--; -if (data->animator.wants == 0) - { - eo_del(data->animator.obj); - data->animator.obj = NULL; - } - } - - return EO_CALLBACK_CONTINUE; -} - static Eo * _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_Type type) { @@ -3985,8 +3926,6 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_ evas_object_show(sd->edje); - eo_do(obj, eo_event_callback_add(EO_BASE_EVENT_CALLBACK_ADD, _cb_added, sd), - eo_event_callback_add(EO_BASE_EVENT_CALLBACK_DEL, _cb_deled, sd)); if (type == ELM_WIN_FAKE) { _elm_win_resize_job(obj); diff --git a/src/lib/elm_win.eo b/src/lib/elm_win.eo index 1d200bf..c59abfe 100644 --- a/src/lib/elm_win.eo +++ b/src/lib/elm_win.eo @@ -1309,7 +1309,6 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, rotation,changed; profile,changed; wm,rotation,changed; - animator,tick; theme,changed; elm,action,block_menu; } --
[EGIT] [core/elementary] master 06/10: map: use Efl.Core.Animator tick.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0ab14fee8ba24f3a5fb402e7dce4dfe303e9c381 commit 0ab14fee8ba24f3a5fb402e7dce4dfe303e9c381 Author: Cedric BAIL Date: Wed Jan 27 16:46:16 2016 -0800 map: use Efl.Core.Animator tick. --- src/lib/elm_map.c| 78 src/lib/elm_widget_map.h | 2 +- 2 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c index 35e01a9..5dce3b2 100644 --- a/src/lib/elm_map.c +++ b/src/lib/elm_map.c @@ -55,6 +55,7 @@ static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); static Eina_Bool _key_action_zoom(Evas_Object *obj, const char *params); +static Eina_Bool _zoom_animator_set(Elm_Map_Data *sd, void *callback); static const Elm_Action key_actions[] = { {"move", _key_action_move}, @@ -1142,55 +1143,41 @@ _zoom_do(Elm_Map_Data *sd, } static Eina_Bool -_zoom_anim_cb(void *data) +_zoom_anim_cb(void *data, + Eo *obj EINA_UNUSED, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info EINA_UNUSED) { ELM_MAP_DATA_GET(data, sd); if (sd->ani.zoom_cnt <= 0) { -sd->zoom_animator = NULL; +_zoom_animator_set(sd, NULL); evas_object_smart_changed(sd->pan_obj); _calc_job(sd); - -return ECORE_CALLBACK_CANCEL; } else { sd->ani.zoom += sd->ani.zoom_diff; sd->ani.zoom_cnt--; _zoom_do(sd, sd->ani.zoom); - -return ECORE_CALLBACK_RENEW; } -} - -static void -_zoom_with_animation(Elm_Map_Data *sd, - double zoom, - int cnt) -{ - if (cnt == 0) return; - - sd->ani.zoom_cnt = cnt; - sd->ani.zoom = sd->zoom; - sd->ani.zoom_diff = (double)(zoom - sd->zoom) / cnt; - ecore_animator_del(sd->zoom_animator); - sd->zoom_animator = ecore_animator_add(_zoom_anim_cb, sd->obj); + return EO_CALLBACK_CONTINUE; } static Eina_Bool -_zoom_bring_anim_cb(void *data) +_zoom_bring_anim_cb(void *data, +Eo *obj EINA_UNUSED, +const Eo_Event_Description *desc EINA_UNUSED, +void *event_info EINA_UNUSED) { ELM_MAP_DATA_GET(data, sd); if ((sd->ani.zoom_cnt <= 0) && (sd->ani.region_cnt <= 0)) { -sd->zoom_animator = NULL; - +_zoom_animator_set(sd, NULL); evas_object_smart_changed(sd->pan_obj); _calc_job(sd); - -return ECORE_CALLBACK_CANCEL; } else { @@ -1214,9 +1201,37 @@ _zoom_bring_anim_cb(void *data) eo_do(sd->obj, elm_interface_scrollable_content_region_show(x, y, w, h)); sd->ani.region_cnt--; } - -return ECORE_CALLBACK_RENEW; } + + return EO_CALLBACK_CONTINUE; +} + +static Eina_Bool +_zoom_animator_set(Elm_Map_Data *sd, + void *callback) +{ + Eina_Bool r = EINA_FALSE; + + sd->zoom_animator = !!callback; + eo_do(sd->obj, + r = eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _zoom_anim_cb, sd->obj); + r |= eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _zoom_bring_anim_cb, sd->obj); + if (callback) eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, callback, sd->obj)); + + return r; +} + +static void +_zoom_with_animation(Elm_Map_Data *sd, + double zoom, + int cnt) +{ + if (cnt == 0) return; + + sd->ani.zoom_cnt = cnt; + sd->ani.zoom = sd->zoom; + sd->ani.zoom_diff = (double)(zoom - sd->zoom) / cnt; + _zoom_animator_set(sd, _zoom_anim_cb); } static void @@ -1244,8 +1259,7 @@ _zoom_bring_with_animation(Elm_Map_Data *sd, sd->ani.lon_diff = (lon - tlon) / region_cnt; sd->ani.lat_diff = (lat - tlat) / region_cnt; - ecore_animator_del(sd->zoom_animator); - sd->zoom_animator = ecore_animator_add(_zoom_bring_anim_cb, sd->obj); + _zoom_animator_set(sd, _zoom_bring_anim_cb); } static void @@ -4157,7 +4171,7 @@ _elm_map_evas_object_smart_del(Eo *obj, Elm_Map_Data *sd) eina_stringshare_del(sd->user_agent); eina_hash_free(sd->ua); ecore_timer_del(sd->zoom_timer); - ecore_animator_del(sd->zoom_animator); + _zoom_animator_set(sd, NULL); _grid_all_clear(sd); // Removal of download list should be after grid clear. @@ -4352,10 +4366,8 @@ _elm_map_paused_set(Eo *obj, Elm_Map_Data *sd, Eina_Bool paused) sd->paused = !!paused; if (sd->paused) { -if (sd->zoom_animator) +if (_zoom_animator_set(sd, NULL)) { - ecore_animator_del(sd->zoom_animator); - sd->zoom_animator = NULL; _zoom_do(sd, sd->zoom); } edje_object_signal_emit(wd->resize_obj, diff --git a/src/lib/elm_widget_map.h b/src/lib/elm_widget_map.h index 61e70d1..9d0652c 100644 --- a/src/lib/elm_widget_map.h +++ b/src/
[EGIT] [core/elementary] master 02/10: panel: switch to use per window animator.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=403843500119ae05445907808a049220dfe455f6 commit 403843500119ae05445907808a049220dfe455f6 Author: Cedric BAIL Date: Tue Jan 26 14:26:31 2016 -0800 panel: switch to use per window animator. Tick provided by to efl.core.animator. --- src/lib/elm_panel.c | 23 +++ src/lib/elm_panel.eo | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c index 2492eb4..17ed000 100644 --- a/src/lib/elm_panel.c +++ b/src/lib/elm_panel.c @@ -1083,8 +1083,12 @@ _elm_panel_evas_object_smart_move(Eo *obj, Elm_Panel_Data *sd, Evas_Coord x, Eva evas_object_move(sd->hit_rect, x, y); } +// FIXME: This is definitively not an animator, but a pre calc function +// Not sure if I can hook on smart calc or on RENDER_PRE, will be left for later static Eina_Bool -_elm_panel_anim_cb(void *data) +_elm_panel_anim_cb(void *data, + Eo *o EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, + void *event_info EINA_UNUSED) { Evas_Object *obj = data; ELM_PANEL_DATA_GET(obj, sd); @@ -1095,7 +1099,7 @@ _elm_panel_anim_cb(void *data) if (sd->hidden) _drawer_close(obj, w, h, EINA_FALSE); else _drawer_open(obj, w, h, EINA_FALSE); - return ECORE_CALLBACK_CANCEL; + return EO_CALLBACK_STOP; } EOLIAN static void @@ -1125,7 +1129,8 @@ _elm_panel_evas_object_smart_resize(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, E break; } - ecore_animator_add(_elm_panel_anim_cb, obj); + eo_do(obj, + eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _elm_panel_anim_cb, obj)); } EOLIAN static void @@ -1181,6 +1186,15 @@ _elm_panel_eo_base_constructor(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED) } EOLIAN static void +_elm_panel_eo_base_destructor(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED) +{ + eo_do(obj, + eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _elm_panel_anim_cb, obj)); + + eo_do_super(obj, MY_CLASS, eo_destructor()); +} + +EOLIAN static void _elm_panel_orient_set(Eo *obj, Elm_Panel_Data *sd, Elm_Panel_Orient orient) { if (sd->orient == orient) return; @@ -1379,7 +1393,8 @@ _elm_panel_scrollable_content_size_set(Eo *obj, Elm_Panel_Data *sd, double ratio break; } - ecore_animator_add(_elm_panel_anim_cb, obj); + eo_do(obj, + eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _elm_panel_anim_cb, obj)); } EOLIAN static Eina_Bool diff --git a/src/lib/elm_panel.eo b/src/lib/elm_panel.eo index 667834c..ffaca51 100644 --- a/src/lib/elm_panel.eo +++ b/src/lib/elm_panel.eo @@ -67,6 +67,7 @@ class Elm.Panel (Elm.Layout, Elm_Interface_Scrollable, implements { class.constructor; Eo.Base.constructor; + Eo.Base.destructor; Evas.Object_Smart.add; Evas.Object_Smart.member_add; Evas.Object_Smart.del; --
[EGIT] [core/enlightenment] master 01/01: update mailmap addresses
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=0aa683b97ce29f154e6657223cb90f0f2553978b commit 0aa683b97ce29f154e6657223cb90f0f2553978b Author: Chris Michael Date: Tue Feb 2 14:03:07 2016 -0500 update mailmap addresses Signed-off-by: Chris Michael --- .mailmap | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.mailmap b/.mailmap index d9d6852..d055df3 100644 --- a/.mailmap +++ b/.mailmap @@ -17,10 +17,11 @@ Vincent Torri Vincent Torri Tom Hacohen Tom 'TAsn' Hacohen Tom Hacohen Tom Gustavo Sverzut Barbieri Gustavo Sverzut Barbieri -Christopher Michael Christopher Michael +Christopher Michael Christopher Michael Christopher Michael Christopher Michael -Christopher Michael Chris Michael -Christopher Michael Chris Michael +Christopher Michael Christopher Michael +Christopher Michael Christopher Michael +Christopher Michael Christopher Michael Sebastian Dransfeld Sebastian Dransfeld Sebastian Dransfeld sebastid Mike Blumenkrantz Mike Blumenkrantz --
[EGIT] [core/efl] master 07/16: evas: make evas object an animator provider.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e8134e868a4369a89e2bb1d65e8ea8dfd72684ad commit e8134e868a4369a89e2bb1d65e8ea8dfd72684ad Author: Cedric BAIL Date: Thu Jan 28 16:15:20 2016 -0800 evas: make evas object an animator provider. --- src/lib/evas/canvas/evas_object.eo | 2 +- src/lib/evas/canvas/evas_object_main.c | 79 ++ src/lib/evas/include/evas_private.h| 2 + 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object.eo b/src/lib/evas/canvas/evas_object.eo index 8baa965..5f9bb56 100644 --- a/src/lib/evas/canvas/evas_object.eo +++ b/src/lib/evas/canvas/evas_object.eo @@ -1,6 +1,6 @@ import evas_types; -abstract Evas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx.Base, Efl.Gfx.Stack) +abstract Evas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx.Base, Efl.Gfx.Stack, Efl.Core.Animator) { eo_prefix: evas_obj; data: Evas_Object_Protected_Data; diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 9f83689..3c986a7 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -82,6 +82,83 @@ _init_cow(void) return EINA_TRUE; } +static Eina_Bool +_animator_repeater(void *data, + Eo *eo_obj EINA_UNUSED, + const Eo_Event_Description2 *desc EINA_UNUSED, + void *event_info) +{ + Evas_Object_Protected_Data *obj = data; + + eo_do(obj->object, + eo_event_callback_call(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, event_info)); + DBG("Emitting animator tick on %p.", obj->object); + + return EO_CALLBACK_CONTINUE; +} + +static Eina_Bool +_check_event_catcher_add(void *data, + Eo *eo_obj EINA_UNUSED, + const Eo_Event_Description2 *desc EINA_UNUSED, + void *event_info) +{ + const Eo_Callback_Array_Item *array = event_info; + Evas_Object_Protected_Data *obj = data; + int i; + + for (i = 0; array[i].desc != NULL; i++) + { +if (array[i].desc == EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK) + { + if (obj->animator_ref++ > 0) break; + + eo_do(evas_object_evas_get(obj->object), + eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _animator_repeater, obj)); + INF("Registering an animator tick on canvas %p for object %p.", + evas_object_evas_get(obj->object), obj->object); + + // No need to walk more than once per array as you can not del + // a partial array + break; + } + } + + return EO_CALLBACK_CONTINUE; +} + +static Eina_Bool +_check_event_catcher_del(void *data, + Eo *eo_obj EINA_UNUSED, + const Eo_Event_Description2 *desc EINA_UNUSED, + void *event_info) +{ + const Eo_Callback_Array_Item *array = event_info; + Evas_Object_Protected_Data *obj = data; + int i; + + for (i = 0; array[i].desc != NULL; i++) + { +if (array[i].desc == EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK) + { + if ((--obj->animator_ref) > 0) break; + + eo_do(evas_object_evas_get(obj->object), + eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _animator_repeater, obj)); + INF("Unregistering an animator tick on canvas %p for object %p.", + evas_object_evas_get(obj->object), obj->object); + + break; + } + } + + return EO_CALLBACK_CONTINUE; +} + +EO_CALLBACKS_ARRAY_DEFINE(event_catcher_watch, + { EO_BASE_EVENT_CALLBACK_ADD, _check_event_catcher_add }, + { EO_BASE_EVENT_CALLBACK_DEL, _check_event_catcher_del }); + EOLIAN static Eo * _evas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj) { @@ -110,6 +187,8 @@ _evas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj) evas_object_inject(eo_obj, obj, evas_object_evas_get(parent)); + eo_do(eo_obj, eo_event_callback_array_add(event_catcher_watch(), obj)); + return eo_obj; } diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 664c144..28f890b 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1072,6 +1072,8 @@ struct _Evas_Object_Protected_Data unsigned intref; + unsigned intanimator_ref; + unsigned char delete_me; struct { --
[EGIT] [core/efl] master 06/16: evas: make evas a provider of animator.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=62030c1003111985922cdb25d56d448601584606 commit 62030c1003111985922cdb25d56d448601584606 Author: Cedric BAIL Date: Thu Jan 28 16:13:55 2016 -0800 evas: make evas a provider of animator. --- src/lib/evas/canvas/evas_canvas.eo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo index 63a6a86..04fcbb6 100644 --- a/src/lib/evas/canvas/evas_canvas.eo +++ b/src/lib/evas/canvas/evas_canvas.eo @@ -1,6 +1,6 @@ import evas_types; -class Evas.Canvas (Eo.Base, Evas.Common_Interface) +class Evas.Canvas (Eo.Base, Evas.Common_Interface, Efl.Core.Animator) { legacy_prefix: evas; data: Evas_Public_Data; --
[EGIT] [core/efl] master 10/16: edje: switch to use per window animator.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a13752dcc707c46faeea8a63bd0d8a168a0412a8 commit a13752dcc707c46faeea8a63bd0d8a168a0412a8 Author: Cedric BAIL Date: Mon Jan 25 16:29:36 2016 -0800 edje: switch to use per window animator. --- src/lib/edje/edje_callbacks.c | 101 ++ src/lib/edje/edje_load.c | 9 ++-- src/lib/edje/edje_main.c | 16 --- src/lib/edje/edje_private.h | 5 +-- src/lib/edje/edje_program.c | 34 +++--- 5 files changed, 67 insertions(+), 98 deletions(-) diff --git a/src/lib/edje/edje_callbacks.c b/src/lib/edje/edje_callbacks.c index ec60ba9..1d97f58 100644 --- a/src/lib/edje/edje_callbacks.c +++ b/src/lib/edje/edje_callbacks.c @@ -374,78 +374,65 @@ _edje_mouse_wheel_signal_cb(void *data, Eo *obj, const Eo_Event_Description *des } Eina_Bool -_edje_timer_cb(void *data EINA_UNUSED) +_edje_timer_cb(void *data, + Eo *obj EINA_UNUSED, + const Eo_Event_Description *desc EINA_UNUSED, + void *event_info EINA_UNUSED) // FIXME: figure out how to use event_info { double t; Eina_List *l; - Eina_List *animl = NULL; - Edje *ed; + Eina_List *newl = NULL; + Edje *ed = data; t = ecore_loop_time_get(); - EINA_LIST_FOREACH(_edje_animators, l, ed) - { -_edje_ref(ed); -animl = eina_list_append(animl, ed); - } - while (animl) + _edje_ref(ed); + + _edje_block(ed); + _edje_util_freeze(ed); + if ((!ed->paused) && (!ed->delete_me)) { -Eina_List *newl = NULL; +const void *tmp; -ed = eina_list_data_get(animl); -_edje_block(ed); -_edje_util_freeze(ed); -animl = eina_list_remove(animl, eina_list_data_get(animl)); -if ((!ed->paused) && (!ed->delete_me)) +ed->walking_actions = EINA_TRUE; +EINA_LIST_FOREACH(ed->actions, l, tmp) + newl = eina_list_append(newl, tmp); +while (newl) { - const void *tmp; + Edje_Running_Program *runp; - ed->walking_actions = EINA_TRUE; - EINA_LIST_FOREACH(ed->actions, l, tmp) - newl = eina_list_append(newl, tmp); - while (newl) + runp = eina_list_data_get(newl); + newl = eina_list_remove(newl, eina_list_data_get(newl)); + if (!runp->delete_me) + _edje_program_run_iterate(runp, t); + if (_edje_block_break(ed)) { - Edje_Running_Program *runp; - - runp = eina_list_data_get(newl); - newl = eina_list_remove(newl, eina_list_data_get(newl)); - if (!runp->delete_me) -_edje_program_run_iterate(runp, t); - if (_edje_block_break(ed)) -{ - eina_list_free(newl); - newl = NULL; - goto break_prog; -} + eina_list_free(newl); + newl = NULL; + goto break_prog; } - EINA_LIST_FOREACH(ed->actions, l, tmp) - newl = eina_list_append(newl, tmp); - while (newl) - { - Edje_Running_Program *runp; + } +EINA_LIST_FOREACH(ed->actions, l, tmp) + newl = eina_list_append(newl, tmp); +while (newl) + { + Edje_Running_Program *runp; - runp = eina_list_data_get(newl); - newl = eina_list_remove(newl, eina_list_data_get(newl)); - if (runp->delete_me) -{ - _edje_anim_count--; - runp->edje->actions = - eina_list_remove(runp->edje->actions, runp); - if (!runp->edje->actions) - _edje_animators = - eina_list_remove(_edje_animators, runp->edje); - free(runp); -} + runp = eina_list_data_get(newl); + newl = eina_list_remove(newl, eina_list_data_get(newl)); + if (runp->delete_me) + { + _edje_program_run_cleanup(ed, runp); + free(runp); } - ed->walking_actions = EINA_FALSE; } -break_prog: -_edje_unblock(ed); -_edje_util_thaw(ed); -_edje_unref(ed); +ed->walking_actions = EINA_FALSE; } - if (_edje_anim_count > 0) return ECORE_CALLBACK_RENEW; - _edje_timer = NULL; - return ECORE_CALLBACK_CANCEL; +break_prog: + _edje_unblock(ed); + _edje_util_thaw(ed); + _edje_unref(ed); + + return EO_CALLBACK_CONTINUE; } Eina_Bool diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index 8c6b6c1..06f783c 100644 --- a/src/lib/edje/edje_loa
[EGIT] [core/efl] master 14/16: evas: no need to call legacy function internally when we can just dereference some pointers.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1ec244a09ef2e3fd89169c2a376387eafed1a84d commit 1ec244a09ef2e3fd89169c2a376387eafed1a84d Author: Cedric BAIL Date: Fri Jan 29 21:42:36 2016 +0100 evas: no need to call legacy function internally when we can just dereference some pointers. --- src/lib/evas/canvas/evas_object_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 3c986a7..21a180c 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -113,10 +113,10 @@ _check_event_catcher_add(void *data, { if (obj->animator_ref++ > 0) break; - eo_do(evas_object_evas_get(obj->object), + eo_do(obj->layer->evas->evas, eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _animator_repeater, obj)); INF("Registering an animator tick on canvas %p for object %p.", - evas_object_evas_get(obj->object), obj->object); + obj->layer->evas->evas, obj->object); // No need to walk more than once per array as you can not del // a partial array @@ -143,10 +143,10 @@ _check_event_catcher_del(void *data, { if ((--obj->animator_ref) > 0) break; - eo_do(evas_object_evas_get(obj->object), + eo_do(obj->layer->evas->evas, eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _animator_repeater, obj)); INF("Unregistering an animator tick on canvas %p for object %p.", - evas_object_evas_get(obj->object), obj->object); + obj->layer->evas->evas, obj->object); break; } --
[EGIT] [core/efl] master 16/16: edje: remove unecessary forced call to recalc all edje file.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f35e2b8bf0bed6d8c6d74a5cacbd99970af4e174 commit f35e2b8bf0bed6d8c6d74a5cacbd99970af4e174 Author: Cedric BAIL Date: Mon Feb 1 16:01:18 2016 -0800 edje: remove unecessary forced call to recalc all edje file. This seems to be a fair improvement as it speeds up by 4% the shutdown of application (and an overall benchmark used to track where genlist spend its time). --- src/lib/edje/edje_util.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 4bb0e9c..8dc51c3 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -114,7 +114,10 @@ _edje_user_definition_free(Edje_User_Defined *eud) #ifdef EDJE_CALC_CACHE rp->invalidate = EINA_TRUE; #endif - _edje_recalc_do(eud->ed); + /* this seems to be as unnecessary as the one in part_unswallow() + * cedric, 1 February 2016 + */ + // _edje_recalc_do(eud->ed); } break; --
[EGIT] [core/efl] master 05/16: efl: add Efl.Core.Animator interface.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e405afb2f94a5c72a4cd120b2e1391571c4e310f commit e405afb2f94a5c72a4cd120b2e1391571c4e310f Author: Cedric BAIL Date: Thu Jan 28 16:12:39 2016 -0800 efl: add Efl.Core.Animator interface. --- src/Makefile_Efl.am | 1 + src/lib/efl/Efl.h| 3 +++ src/lib/efl/interfaces/efl_core_animator.eo | 11 +++ src/lib/efl/interfaces/efl_interfaces_main.c | 1 + 4 files changed, 16 insertions(+) diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index b3b2e86..c055257 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -19,6 +19,7 @@ efl_eolian_files = \ lib/efl/interfaces/efl_gfx_gradient_radial.eo \ lib/efl/interfaces/efl_gfx_filter.eo \ lib/efl/interfaces/efl_model_base.eo \ + lib/efl/interfaces/efl_core_animator.eo \ $(efl_eolian_legacy_files) \ $(NULL) diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index 9b41e6b..b8bc51d 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -175,6 +175,9 @@ struct _Efl_Gfx_Shape_Public #include "interfaces/efl_text.eo.h" #include "interfaces/efl_text_properties.eo.h" +/* Core interface */ +#include "interfaces/efl_core_animator.eo.h" + EAPI extern const Eo_Event_Description _EFL_GFX_CHANGED; EAPI extern const Eo_Event_Description _EFL_GFX_PATH_CHANGED; diff --git a/src/lib/efl/interfaces/efl_core_animator.eo b/src/lib/efl/interfaces/efl_core_animator.eo new file mode 100644 index 000..b6990d7 --- /dev/null +++ b/src/lib/efl/interfaces/efl_core_animator.eo @@ -0,0 +1,11 @@ +struct Efl.Core.Event.Animator_Tick { + update_area: Eina.Rectangle; [[Area of the canvas that will be pushed to screen.]] +} + +interface Efl.Core.Animator { + legacy_prefix: null; + eo_prefix: efl_animator; + events { + animator,tick: Efl.Core.Event.Animator_Tick; [[Animator tick synchronized with screen vsync if possible.]] + } +} diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 1f2eeb8..ff090cb 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -29,3 +29,4 @@ EAPI const Eo_Event_Description _EFL_GFX_PATH_CHANGED = EO_EVENT_DESCRIPTION("Graphics path changed"); #include "interfaces/efl_model_base.eo.c" +#include "interfaces/efl_core_animator.eo.c" --
[EGIT] [core/efl] master 03/16: eo: mark both callback, add and callback, del as @hot.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0ae951e5448715994b40a754c6434a1edf1e16ec commit 0ae951e5448715994b40a754c6434a1edf1e16ec Author: Cedric BAIL Date: Tue Feb 2 10:28:28 2016 -0800 eo: mark both callback,add and callback,del as @hot. This events needs to be hot to remain unfreezable or it is impossible for anyone to track all callback setting/unsetting safely. --- src/lib/eo/eo_base.eo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index f168137..53b49b3 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -285,8 +285,8 @@ abstract Eo.Base () class.destructor; } events { - callback,add; [[A callback was added.]] - callback,del; [[A callback was deleted.]] + callback,add @hot; [[A callback was added.]] + callback,del @hot; [[A callback was deleted.]] del; [[Obj is being deleted.]] } } --
[EGIT] [core/efl] master 12/16: ecore_evas: switch main animator to use the first windows source for tick.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7ffa801cf349715b040bd9ffb9f6d7acc0b9585e commit 7ffa801cf349715b040bd9ffb9f6d7acc0b9585e Author: Cedric BAIL Date: Wed Jan 27 16:00:42 2016 -0800 ecore_evas: switch main animator to use the first windows source for tick. --- src/lib/ecore_evas/ecore_evas.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index d61f75f..0ac2274 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3069,6 +3069,8 @@ _ecore_evas_fps_debug_rendertime_add(double t) } } +static Ecore_Evas *_general_tick = NULL; + EAPI void ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport) { @@ -3095,6 +3097,39 @@ ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport) evas_output_size_get(subee->evas, &a.update_area.w, &a.update_area.h); eo_do(subee->evas, eo_event_callback_call(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, &a)); } + + // We are the source of sync for general animator. + if (_general_tick == ee) + { +// Check first we didn't tick during this loop +if (!ecore_main_loop_animator_ticked_get()) + ecore_animator_custom_tick(); + } +} + +static void +_ecore_evas_tick_source_find(void) +{ + Ecore_Evas *ee; + + _general_tick = NULL; + EINA_INLIST_FOREACH(ecore_evases, ee) + if (ee->anim_count && +ee->engine.func->fn_animator_register && + ee->engine.func->fn_animator_unregister) + { + _general_tick = ee; + break; + } + + if (!_general_tick) + { +ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER); + } + else + { +ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM); + } } static Eina_Bool @@ -3125,6 +3160,7 @@ _check_animator_event_catcher_add(void *data, { // Backend support per window vsync ee->engine.func->fn_animator_register(ee); + if (!_general_tick) _general_tick = ee; } else { @@ -3162,6 +3198,7 @@ _check_animator_event_catcher_del(void *data, { // Backend support per window vsync ee->engine.func->fn_animator_unregister(ee); + if (_general_tick == ee) _ecore_evas_tick_source_find(); } else { @@ -3226,6 +3263,7 @@ _ecore_evas_free(Ecore_Evas *ee) { // Backend support per window vsync ee->engine.func->fn_animator_unregister(ee); +if (_general_tick == ee) _ecore_evas_tick_source_find(); } if (ee->anim) ecore_animator_del(ee->anim); --
[EGIT] [core/efl] master 15/16: evas: don't emit EVAS_CALLBACK_MOVE event if nobody is listening.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bdd163fce85202e3cab0d269eda452e3ecd5b7c0 commit bdd163fce85202e3cab0d269eda452e3ecd5b7c0 Author: Cedric BAIL Date: Mon Feb 1 15:46:50 2016 -0800 evas: don't emit EVAS_CALLBACK_MOVE event if nobody is listening. This give a constant improvement of 2% over a total benchmark run while scrolling genlist. This benchmark included setup and destruction of the scene, so under estimate the cost of the callback emit. --- src/lib/evas/canvas/evas_callbacks.c | 6 ++ src/lib/evas/canvas/evas_object_main.c | 14 -- src/lib/evas/include/evas_private.h| 1 + 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index 2d36129..321101f 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -201,6 +201,11 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data if (!(e = obj->layer->evas)) return; _evas_walk(e); + + if (type == EVAS_CALLBACK_MOVE && + obj->move_ref == 0) + goto nothing_here; + { switch (type) { @@ -248,6 +253,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data } } + nothing_here: if (!obj->no_propagate) { if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 21a180c..daf236c 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -117,10 +117,10 @@ _check_event_catcher_add(void *data, eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _animator_repeater, obj)); INF("Registering an animator tick on canvas %p for object %p.", obj->layer->evas->evas, obj->object); - - // No need to walk more than once per array as you can not del - // a partial array - break; + } +else if (array[i].desc == EVAS_OBJECT_EVENT_MOVE) + { + obj->move_ref++; } } @@ -147,8 +147,10 @@ _check_event_catcher_del(void *data, eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _animator_repeater, obj)); INF("Unregistering an animator tick on canvas %p for object %p.", obj->layer->evas->evas, obj->object); - - break; + } +else if (array[i].desc == EVAS_OBJECT_EVENT_MOVE) + { + obj->move_ref--; } } diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 28f890b..41fe143 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1073,6 +1073,7 @@ struct _Evas_Object_Protected_Data unsigned intref; unsigned intanimator_ref; + unsigned intmove_ref; unsigned char delete_me; --
[EGIT] [core/efl] master 02/16: evas: move canvas event to be declared inside proper eolian file.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bf26946ba14ad564190e12fcc6a51cfab681926d commit bf26946ba14ad564190e12fcc6a51cfab681926d Author: Cedric BAIL Date: Fri Jan 22 15:07:51 2016 -0800 evas: move canvas event to be declared inside proper eolian file. --- src/lib/evas/Evas_Eo.h | 25 - src/lib/evas/canvas/evas_callbacks.c | 25 - src/lib/evas/canvas/evas_canvas.eo | 14 +- 3 files changed, 13 insertions(+), 51 deletions(-) diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index e581315..a56a5e7 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -2,31 +2,6 @@ # error You shall not include this header directly #endif -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_IN; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_OUT; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_POST; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_PRE; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE; -EAPI extern const Eo_Event_Description _EVAS_CANVAS_EVENT_VIEWPORT_RESIZE; - -// Callbacks events for use with Evas canvases -#define EVAS_CANVAS_EVENT_FOCUS_IN (&(_EVAS_CANVAS_EVENT_FOCUS_IN)) -#define EVAS_CANVAS_EVENT_FOCUS_OUT (&(_EVAS_CANVAS_EVENT_FOCUS_OUT)) -#define EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE (&(_EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE)) -#define EVAS_CANVAS_EVENT_RENDER_FLUSH_POST (&(_EVAS_CANVAS_EVENT_RENDER_FLUSH_POST)) -#define EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN (&(_EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN)) -#define EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT (&(_EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT)) -#define EVAS_CANVAS_EVENT_RENDER_PRE (&(_EVAS_CANVAS_EVENT_RENDER_PRE)) -#define EVAS_CANVAS_EVENT_RENDER_POST (&(_EVAS_CANVAS_EVENT_RENDER_POST)) -#define EVAS_CANVAS_EVENT_DEVICE_CHANGED (&(_EVAS_CANVAS_EVENT_DEVICE_CHANGED)) -#define EVAS_CANVAS_EVENT_AXIS_UPDATE (&(_EVAS_CANVAS_EVENT_AXIS_UPDATE)) -#define EVAS_CANVAS_EVENT_VIEWPORT_RESIZE (&(_EVAS_CANVAS_EVENT_VIEWPORT_RESIZE)) - #include "canvas/evas_signal_interface.eo.h" #include "canvas/evas_draggable_interface.eo.h" #include "canvas/evas_clickable_interface.eo.h" diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c index c86eb61..2d36129 100644 --- a/src/lib/evas/canvas/evas_callbacks.c +++ b/src/lib/evas/canvas/evas_callbacks.c @@ -7,31 +7,6 @@ EVAS_MEMPOOL(_mp_pc); extern Eina_Hash* signals_hash_table; -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_PRE = - EO_EVENT_DESCRIPTION("Render Pre"); -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_POST = - EO_EVENT_DESCRIPTION("Render Post"); - -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_AXIS_UPDATE = - EO_EVENT_DESCRIPTION("Axis Update"); - -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_IN = - EO_EVENT_DESCRIPTION_HOT("Canvas Focus In"); -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_FOCUS_OUT = - EO_EVENT_DESCRIPTION_HOT("Canvas Focus Out"); -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE = - EO_EVENT_DESCRIPTION_HOT("Render Flush Pre"); -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_RENDER_FLUSH_POST = - EO_EVENT_DESCRIPTION_HOT("Render Flush Post"); -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN = - EO_EVENT_DESCRIPTION_HOT("Canvas Object Focus In"); -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT = - EO_EVENT_DESCRIPTION_HOT("Canvas Object Focus Out"); - -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_DEVICE_CHANGED = - EO_EVENT_DESCRIPTION_HOT("Device changed"); -EAPI const Eo_Event_Description _EVAS_CANVAS_EVENT_VIEWPORT_RESIZE = - EO_EVENT_DESCRIPTION_HOT("Canvas viewport resize"); /** * Evas events descriptions for Eo. */ diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo index 1b72fed..63a6a86 100644 --- a/src/lib/evas/canvas/evas_canvas.eo +++ b/src/lib/evas/canvas/evas_canvas.eo @@ -1638,5 +1638,17 @@ class Evas.Canvas (Eo.Base, Evas.Common_Interface) Eo.Base.event_freeze; Evas.Common_Interface.evas.get; } - + events { + focus,in; + focus,out; + object,focus,in; + object,focus,out; + render,pre; + render,post; + render,flush,pre; + render,flush,post; + device,changed; + axis,update; + viewport,resize; + } } --
[EGIT] [core/efl] master 09/16: ecore_evas: optimize triggering of animator to happen only when someone is listening.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0812fc8f6c3ff4a815a4ef19875aabf064b68367 commit 0812fc8f6c3ff4a815a4ef19875aabf064b68367 Author: Cedric BAIL Date: Mon Jan 25 15:44:54 2016 -0800 ecore_evas: optimize triggering of animator to happen only when someone is listening. --- src/lib/ecore_evas/ecore_evas.c | 88 - src/lib/ecore_evas/ecore_evas_private.h | 1 + 2 files changed, 78 insertions(+), 11 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index fa0c8eb..d61f75f 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3104,6 +3104,82 @@ _ecore_evas_animator_fallback(void *data) return EINA_TRUE; } +static Eina_Bool +_check_animator_event_catcher_add(void *data, + Eo *obj EINA_UNUSED, + const Eo_Event_Description2 *desc EINA_UNUSED, + void *event_info) +{ + const Eo_Callback_Array_Item *array = event_info; + Ecore_Evas *ee = data; + int i; + + for (i = 0; array[i].desc != NULL; i++) + { +if (array[i].desc == EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK) + { + if (ee->anim_count++ > 0) return EO_CALLBACK_CONTINUE; + + if (ee->engine.func->fn_animator_register && + ee->engine.func->fn_animator_unregister) + { + // Backend support per window vsync + ee->engine.func->fn_animator_register(ee); + } + else + { + // Backend doesn't support per window vsync, fallback to generic support + ee->anim = ecore_animator_add(_ecore_evas_animator_fallback, ee); + } + + // No need to walk more than once per array as you can not del + // a partial array + return EO_CALLBACK_CONTINUE; + } + } + + return EO_CALLBACK_CONTINUE; +} + +static Eina_Bool +_check_animator_event_catcher_del(void *data, + Eo *obj EINA_UNUSED, + const Eo_Event_Description2 *desc EINA_UNUSED, + void *event_info) +{ + const Eo_Callback_Array_Item *array = event_info; + Ecore_Evas *ee = data; + int i; + + for (i = 0; array[i].desc != NULL; i++) + { +if (array[i].desc == EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK) + { + if ((--ee->anim_count) > 0) return EO_CALLBACK_CONTINUE; + + if (ee->engine.func->fn_animator_register && + ee->engine.func->fn_animator_unregister) + { + // Backend support per window vsync + ee->engine.func->fn_animator_unregister(ee); + } + else + { + // Backend doesn't support per window vsync, fallback to generic support + ecore_animator_del(ee->anim); + ee->anim = NULL; + } + return EO_CALLBACK_CONTINUE; + } + } + + return EO_CALLBACK_CONTINUE; +} + +EO_CALLBACKS_ARRAY_DEFINE(animator_watch, + { EO_BASE_EVENT_CALLBACK_ADD, _check_animator_event_catcher_add }, + { EO_BASE_EVENT_CALLBACK_DEL, _check_animator_event_catcher_del }); + EAPI void _ecore_evas_register(Ecore_Evas *ee) { @@ -3111,17 +3187,7 @@ _ecore_evas_register(Ecore_Evas *ee) ecore_evases = (Ecore_Evas *)eina_inlist_prepend (EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee)); - if (ee->engine.func->fn_animator_register && - ee->engine.func->fn_animator_unregister) - { -// Backend support per window vsync -ee->engine.func->fn_animator_register(ee); - } - else - { -// Backend doesn't support per window vsync, fallback to generic support -ee->anim = ecore_animator_add(_ecore_evas_animator_fallback, ee); - } + eo_do(ee->evas, eo_event_callback_array_add(animator_watch(), ee)); #ifdef RENDER_SYNC ecore_evas_first = EINA_TRUE; diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h index 62e5545..a179733 100644 --- a/src/lib/ecore_evas/ecore_evas_private.h +++ b/src/lib/ecore_evas/ecore_evas_private.h @@ -299,6 +299,7 @@ struct _Ecore_Evas // Animator code Ecore_Animator *anim; + unsigned int anim_count; struct { unsigned char avoid_damage; --
[EGIT] [core/efl] master 08/16: ecore_evas: introduce support for per window animator trigger.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bb1a1eef65a0f6db99e446d4ac56fc2896496be0 commit bb1a1eef65a0f6db99e446d4ac56fc2896496be0 Author: Cedric BAIL Date: Mon Jan 25 15:18:28 2016 -0800 ecore_evas: introduce support for per window animator trigger. This code is currently only using the older fallback code and not any new event source, so all animator on all window are still triggered whatever the case are. --- src/lib/ecore_evas/ecore_evas.c| 58 ++ src/lib/ecore_evas/ecore_evas_private.h| 8 +++ .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c| 14 +- .../ecore_evas/engines/drm/ecore_evas_drm.c| 5 +- .../ecore_evas/engines/extn/ecore_evas_extn.c | 5 +- src/modules/ecore_evas/engines/fb/ecore_evas_fb.c | 7 ++- .../engines/psl1ght/ecore_evas_psl1ght.c | 5 +- .../ecore_evas/engines/sdl/ecore_evas_sdl.c| 5 +- .../engines/wayland/ecore_evas_wayland_egl.c | 5 +- .../engines/wayland/ecore_evas_wayland_shm.c | 5 +- .../ecore_evas/engines/win32/ecore_evas_win32.c| 5 +- src/modules/ecore_evas/engines/x/ecore_evas_x.c| 5 +- 12 files changed, 116 insertions(+), 11 deletions(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index d3e3f28..fa0c8eb 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3070,12 +3070,59 @@ _ecore_evas_fps_debug_rendertime_add(double t) } EAPI void +ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport) +{ + Ecore_Evas *subee; + Eina_List *l; + Efl_Core_Event_Animator_Tick a = { { 0 } }; + + if (!viewport) + { +evas_output_size_get(ee->evas, &a.update_area.w, &a.update_area.h); + } + else + { +a.update_area = *viewport; + } + + eo_do(ee->evas, eo_event_callback_call(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, &a)); + + // FIXME: We do not support partial animator in the subcanvas + a.update_area.x = 0; + a.update_area.y = 0; + EINA_LIST_FOREACH(ee->sub_ecore_evas, l, subee) + { +evas_output_size_get(subee->evas, &a.update_area.w, &a.update_area.h); +eo_do(subee->evas, eo_event_callback_call(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, &a)); + } +} + +static Eina_Bool +_ecore_evas_animator_fallback(void *data) +{ + ecore_evas_animator_tick(data, NULL); + return EINA_TRUE; +} + +EAPI void _ecore_evas_register(Ecore_Evas *ee) { ee->registered = 1; ecore_evases = (Ecore_Evas *)eina_inlist_prepend (EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee)); + if (ee->engine.func->fn_animator_register && + ee->engine.func->fn_animator_unregister) + { +// Backend support per window vsync +ee->engine.func->fn_animator_register(ee); + } + else + { +// Backend doesn't support per window vsync, fallback to generic support +ee->anim = ecore_animator_add(_ecore_evas_animator_fallback, ee); + } + #ifdef RENDER_SYNC ecore_evas_first = EINA_TRUE; #endif @@ -3107,6 +3154,17 @@ _ecore_evas_free(Ecore_Evas *ee) ee->deleted = EINA_TRUE; if (ee->refcount > 0) return; + // Stop all vsync first + if (ee->engine.func->fn_animator_register && + ee->engine.func->fn_animator_unregister) + { +// Backend support per window vsync +ee->engine.func->fn_animator_unregister(ee); + } + if (ee->anim) + ecore_animator_del(ee->anim); + ee->anim = NULL; + if (ee->func.fn_pre_free) ee->func.fn_pre_free(ee); while (ee->sub_ecore_evas) { diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h index c342ace..62e5545 100644 --- a/src/lib/ecore_evas/ecore_evas_private.h +++ b/src/lib/ecore_evas/ecore_evas_private.h @@ -153,6 +153,9 @@ struct _Ecore_Evas_Engine_Func void (*fn_wm_rot_manual_rotation_done) (Ecore_Evas *ee); void (*fn_aux_hints_set) (Ecore_Evas *ee, const char *hints); + + void (*fn_animator_register) (Ecore_Evas *ee); + void (*fn_animator_unregister)(Ecore_Evas *ee); }; struct _Ecore_Evas_Interface @@ -294,6 +297,9 @@ struct _Ecore_Evas Ecore_Evas_Engine engine; Eina_List *sub_ecore_evas; + // Animator code + Ecore_Animator *anim; + struct { unsigned char avoid_damage; unsigned char resize_shape : 1; @@ -419,6 +425,8 @@ const Eina_List *_ecore_evas_available_engines_get(void); void _ecore_evas_engine_init(void); void _ecore_evas_engine_shutdown(void); +EAPI void ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport); + #undef EAPI #define EAPI diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c index 0f9c3b6..054a1e2 100644 --- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c +++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_c
[EGIT] [core/efl] master 13/16: ecore_evas: add log when registering, unregistering and emitting animator.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2cdead3e71b37b81638a4672e06a6abc6c33e1b6 commit 2cdead3e71b37b81638a4672e06a6abc6c33e1b6 Author: Cedric BAIL Date: Thu Jan 28 14:59:07 2016 -0800 ecore_evas: add log when registering, unregistering and emitting animator. --- src/lib/ecore_evas/ecore_evas.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index 0ac2274..6a4f3fb 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3105,6 +3105,8 @@ ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport) if (!ecore_main_loop_animator_ticked_get()) ecore_animator_custom_tick(); } + + DBG("Animator ticked on %p.", ee->evas); } static void @@ -3154,6 +3156,7 @@ _check_animator_event_catcher_add(void *data, if (array[i].desc == EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK) { if (ee->anim_count++ > 0) return EO_CALLBACK_CONTINUE; + INF("Setting up animator for %p.", ee->evas); if (ee->engine.func->fn_animator_register && ee->engine.func->fn_animator_unregister) @@ -3193,6 +3196,7 @@ _check_animator_event_catcher_del(void *data, { if ((--ee->anim_count) > 0) return EO_CALLBACK_CONTINUE; + INF("Unsetting up animator for %p.", ee->evas); if (ee->engine.func->fn_animator_register && ee->engine.func->fn_animator_unregister) { --
[EGIT] [core/efl] master 11/16: eo: return a value when adding or removing callback to help the caller manage state.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f1bf1e58df38146a384fc8d4556400e0c02c4bc5 commit f1bf1e58df38146a384fc8d4556400e0c02c4bc5 Author: Cedric BAIL Date: Wed Jan 27 11:42:48 2016 -0800 eo: return a value when adding or removing callback to help the caller manage state. --- src/lib/eo/eo_base.eo | 4 src/lib/eo/eo_base_class.c | 37 ++ src/lib/evas/canvas/evas_canvas3d_object.c | 16 + 3 files changed, 37 insertions(+), 20 deletions(-) diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index 53b49b3..18f780a 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -176,6 +176,7 @@ abstract Eo.Base () callbacks of the same priority are called in reverse order of creation. ]] +return: bool; [[Return true when the callback has been successfully added.]] params { @in desc: const(Eo.Event_Description)*; [[The description of the event to listen to]] @in priority: Eo.Callback_Priority; [[The priority of the callback]] @@ -185,6 +186,7 @@ abstract Eo.Base () } event_callback_del { [[Del a callback with a specific data associated to it for an event.]] +return: bool; [[Return true when the callback has been successfully removed.]] params { @in desc: const(Eo.Event_Description)*; [[The description of the event to listen to]] @in func: Eo.Event_Cb; [[the callback to delete]] @@ -197,6 +199,7 @@ abstract Eo.Base () callbacks of the same priority are called in reverse order of creation. ]] +return: bool; [[Return true when the callback has been successfully added.]] params { @in array: const(Eo.Callback_Array_Item)*; [[an #Eo_Callback_Array_Item of events to listen to]] @in priority: Eo.Callback_Priority; [[The priority of the callback]] @@ -207,6 +210,7 @@ abstract Eo.Base () [[Del a callback array with a specific data associated to it for an event. ]] +return: bool; [[Return true when the callback has been successfully removed.]] params { @in array: const(Eo.Callback_Array_Item)*; [[an #Eo_Callback_Array_Item of events to listen to]] @in user_data: const(void)*; [[The data to compare]] diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index d27e256..64c6df3 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -551,13 +551,14 @@ _eo_callbacks_sorted_insert(Eo_Base_Data *pd, Eo_Callback_Description *cb) } } -EOLIAN static void +EOLIAN static Eina_Bool _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd, const Eo_Event_Description *desc, Eo_Callback_Priority priority, Eo_Event_Cb func, const void *user_data) { + const Eo_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}}; Eo_Callback_Description *cb; cb = calloc(1, sizeof(*cb)); @@ -565,7 +566,7 @@ _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd, { ERR("Tried adding callback with invalid values: cb: %p desc: %p func: %p\n", cb, desc, func); free(cb); -return; +return EINA_FALSE; } cb->items.item.desc = desc; cb->items.item.func = func; @@ -573,13 +574,12 @@ _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd, cb->priority = priority; _eo_callbacks_sorted_insert(pd, cb); - { -const Eo_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}}; -eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_ADD, (void *)arr)); - } + eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_ADD, (void *)arr)); + + return EINA_TRUE; } -EOLIAN static void +EOLIAN static Eina_Bool _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd, const Eo_Event_Description *desc, Eo_Event_Cb func, @@ -598,14 +598,15 @@ _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd, pd->deletions_waiting = EINA_TRUE; _eo_callbacks_clear(pd); eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_DEL, (void *)arr); ); - return; + return EINA_TRUE; } } DBG("Callback of object %p with function %p and data %p not found.", obj, func, user_data); + return EINA_FALSE; } -EOLIAN static void +EOLIAN static Eina_Bool _eo_base_event_callback_array_priority_add(Eo *obj, Eo_Base_Data *pd, const Eo_Callback_Array_Item *array, Eo_Callback_Priority priority, @@ -614,19 +615,24 @@ _eo_base_event_callback_array_priority_add(Eo *obj, Eo_Base_Data *pd, Eo_Callback_Descripti