seoz pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=4a990e0c6d24150510758ff9a4272023a2d13365
commit 4a990e0c6d24150510758ff9a4272023a2d13365 Author: Daniel Juyung Seo <seojuyu...@gmail.com> Date: Fri Oct 18 20:33:47 2013 +0900 elm_photo: Do not call clicked callback when drag and drop started. --- src/lib/elm_photo.c | 7 ++++++- src/lib/elm_widget_photo.h | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_photo.c b/src/lib/elm_photo.c index c3a0189..7c0d384 100644 --- a/src/lib/elm_photo.c +++ b/src/lib/elm_photo.c @@ -111,8 +111,11 @@ static void _drag_done_cb(void *unused __UNUSED__, Evas_Object *obj) { + ELM_PHOTO_DATA_GET(obj, sd); + elm_object_scroll_freeze_pop(obj); evas_object_smart_callback_call(obj, SIG_DRAG_END, NULL); + sd->drag_started = EINA_FALSE; } static void @@ -174,6 +177,7 @@ _long_press_cb(void *obj) { elm_object_scroll_freeze_push(obj); evas_object_smart_callback_call(obj, SIG_DRAG_START, NULL); + sd->drag_started = EINA_TRUE; } } @@ -213,7 +217,8 @@ _mouse_up(void *data, ELM_SAFE_FREE(sd->long_press_timer, ecore_timer_del); - evas_object_smart_callback_call(data, SIG_CLICKED, NULL); + if (!sd->drag_started) + evas_object_smart_callback_call(data, SIG_CLICKED, NULL); } static inline int diff --git a/src/lib/elm_widget_photo.h b/src/lib/elm_widget_photo.h index 50b9db2..a4d32e8 100644 --- a/src/lib/elm_widget_photo.h +++ b/src/lib/elm_widget_photo.h @@ -23,7 +23,6 @@ struct _Elm_Photo_Smart_Data { Evas_Object *icon; int size; - Eina_Bool fill_inside; Ecore_Timer *long_press_timer; #ifdef HAVE_ELEMENTARY_ETHUMB @@ -36,6 +35,9 @@ struct _Elm_Photo_Smart_Data } file, thumb; } thumb; #endif + + Eina_Bool fill_inside: 1; + Eina_Bool drag_started: 1; /*<< set true when drag started */ }; /** --