}
static void
-_sub_obj_mouse_down(void *data __UNUSED__,
- Evas *e __UNUSED__,
- Evas_Object *obj,
- void *event_info __UNUSED__)
+_sub_obj_mouse_up(void *data __UNUSED__,
+ Evas *e __UNUSED__,
+ Evas_Object *obj,
+ void *event_info)
{
- elm_widget_focus_mouse_down_handle(obj);
+ Evas_Event_Mouse_Up *ev = event_info;
+ if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
+ elm_widget_focus_mouse_up_handle(obj);
}
static void
}
evas_object_event_callback_del_full(sd->resize_obj, EVAS_CALLBACK_DEL,
_sub_obj_del, sd);
- evas_object_event_callback_del_full(sd->resize_obj, EVAS_CALLBACK_MOUSE_DOWN,
- _sub_obj_mouse_down, sd);
+ evas_object_event_callback_del_full(sd->resize_obj, EVAS_CALLBACK_MOUSE_UP,
+ _sub_obj_mouse_up, sd);
evas_object_smart_member_del(sd->resize_obj);
if (_elm_widget_is(sd->resize_obj))
{
}
evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_DEL,
_sub_obj_del, sd);
- evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_MOUSE_DOWN,
- _sub_obj_mouse_down, sd);
+ evas_object_event_callback_del_full(sobj, EVAS_CALLBACK_MOUSE_UP,
+ _sub_obj_mouse_up, sd);
evas_object_smart_member_del(sobj);
if (_elm_widget_is(sobj))
{
evas_object_smart_member_add(sobj, obj);
evas_object_event_callback_add(sobj, EVAS_CALLBACK_DEL,
_sub_obj_del, sd);
- evas_object_event_callback_add(sobj, EVAS_CALLBACK_MOUSE_DOWN,
- _sub_obj_mouse_down, sd);
+ evas_object_event_callback_add(sobj, EVAS_CALLBACK_MOUSE_UP,
+ _sub_obj_mouse_up, sd);
_smart_reconfigure(sd);
evas_object_data_set(sobj, "elm-parent", obj);
evas_object_smart_callback_call(obj, "sub-object-add", sobj);
}
EAPI void
-elm_widget_focus_mouse_down_handle(Evas_Object *obj)
+elm_widget_focus_mouse_up_handle(Evas_Object *obj)
{
Evas_Object *o = obj;
do
EAPI Eina_List *elm_widget_stringlist_get(const char *str);
EAPI void elm_widget_stringlist_free(Eina_List *list);
EAPI void elm_widget_focus_hide_handle(Evas_Object *obj);
-EAPI void elm_widget_focus_mouse_down_handle(Evas_Object *obj);
+EAPI void elm_widget_focus_mouse_up_handle(Evas_Object *obj);
EAPI void elm_widget_focus_tree_unfocusable_handle(Evas_Object *obj);
EAPI void elm_widget_focus_disabled_handle(Evas_Object *obj);
EAPI void elm_widget_text_part_set(Evas_Object *obj, const char *part, const char *label);
}
static void
-_win_img_mouse_down(void *data,
- Evas *e __UNUSED__,
- Evas_Object *obj __UNUSED__,
- void *event_info __UNUSED__)
+_win_img_mouse_up(void *data,
+ Evas *e __UNUSED__,
+ Evas_Object *obj __UNUSED__,
+ void *event_info)
{
Elm_Win *win = data;
- elm_widget_focus_mouse_down_handle(win->win_obj);
+ Evas_Event_Mouse_Up *ev = event_info;
+ if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
+ elm_widget_focus_mouse_up_handle(win->win_obj);
}
static void
evas_object_event_callback_add(win->img_obj, EVAS_CALLBACK_HIDE,
_win_img_hide, win);
- evas_object_event_callback_add(win->img_obj, EVAS_CALLBACK_MOUSE_DOWN,
- _win_img_mouse_down, win);
+ evas_object_event_callback_add(win->img_obj, EVAS_CALLBACK_MOUSE_UP,
+ _win_img_mouse_up, win);
evas_object_event_callback_add(win->img_obj, EVAS_CALLBACK_FOCUS_IN,
_win_img_focus_in, win);
evas_object_event_callback_add(win->img_obj, EVAS_CALLBACK_FOCUS_OUT,