bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7a6d5dd9f3319c621fcbc9cb2da501cf3a2cf078
commit 7a6d5dd9f3319c621fcbc9cb2da501cf3a2cf078 Author: Mike Blumenkrantz <[email protected]> Date: Mon Oct 21 11:02:18 2019 -0400 elm/genlist: fix item highlight/unhighlight eventing on clicks * highlight should only be triggered on mouse down, as that is the point of interaction with an item which indicates it is "in use"; a mouse-up event cannot occur on an item which has not previously received a mouse-down event, so toggling this on mouse-up will be wrong/duplicated 100% of the time * unhighlight should only be triggered during mouse-up events if the list is in no-select mode, as it will otherwise be implicitly during selection if necessary this should ensure that these events are emitted exactly one time and correctly for each click event Reviewed-by: Cedric BAIL <[email protected]> Differential Revision: https://phab.enlightenment.org/D10517 --- src/lib/elementary/elm_genlist.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 182de48de5..29f47f94f1 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -5168,7 +5168,10 @@ _item_mouse_up_cb(void *data, } } - if (!it->selected && it->highlighted) + /* this is handled implicitly in _item_unselect() below unless there + * will be no select + */ + if (!it->selected && it->highlighted && _is_no_select(it)) _item_unhighlight(it); if ((ev->flags != EVAS_BUTTON_NONE) || @@ -5191,7 +5194,9 @@ _item_mouse_up_cb(void *data, { if (!it->selected) { + /* this should only be handled on mouse down _item_highlight(it); + */ if (_item_select(it)) goto deleted; } else @@ -5220,7 +5225,9 @@ _item_mouse_up_cb(void *data, _item_unselect(it2); } } + /* this should only be handled on mouse down _item_highlight(it); + */ if (_item_select(it)) goto deleted; } --
