gengrid: Prevent duplicated selected function calls when item is unselected in the...
authorYoungbok Shin <youngb.shin@samsung.com>
Wed, 18 Nov 2015 10:39:13 +0000 (19:39 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Wed, 18 Nov 2015 10:39:13 +0000 (19:39 +0900)
commitebbc66a25c08e6e60903783a26ef4715c8500c4b
treee42d67ef4df7e4f7752638e0e3b5217a856829c7
parent7f8973ede6c00e058f054403ae96edaca0b2977f
gengrid: Prevent duplicated selected function calls when item is unselected in the function.

Summary:
If item is unselected in a selected function,
selected function will be called once more from _elm_gengrid_elm_widget_on_focus.
It is happened when elm_gengrid object has no focus and one of item is selected by mouse up event.
To fix this issue, we need to set focus to item and keep the address of selected item before calling selected function.
@fix

Test Plan:
1. Install & Run efbb (Escape From Booty Bay: https://git.enlightenment.org/games/efbb.git/)
2. Select a level in the main menu. (It is using elm_gengrid).
3. See duplicated target images.

Reviewers: cedric, SanghyeonLee

Reviewed By: SanghyeonLee

Differential Revision: https://phab.enlightenment.org/D3323
legacy/elementary/src/lib/elm_gengrid.c