improve efm mouse move detection (no more tooltips when cursor is in separate window)
This commit is contained in:
parent
0636064d62
commit
1da8387c2f
|
@ -1,3 +1,7 @@
|
||||||
|
2013-04-25 Mike Blumenkrantz
|
||||||
|
|
||||||
|
* improve efm mouse movement detection for icons
|
||||||
|
|
||||||
2013-04-09 Rafael Antognolli
|
2013-04-09 Rafael Antognolli
|
||||||
|
|
||||||
* 0.17.2.1 release
|
* 0.17.2.1 release
|
||||||
|
|
18
NEWS
18
NEWS
|
@ -1,3 +1,21 @@
|
||||||
|
Changes since 0.17.2:
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Additions:
|
||||||
|
|
||||||
|
Deprecations:
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
Removed:
|
||||||
|
|
||||||
|
Improvements:
|
||||||
|
* improve efm mouse movement detection for icons
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Changes since 0.17.1:
|
Changes since 0.17.1:
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ struct _E_Fm2_Icon
|
||||||
E_Fm2_Smart_Data *sd;
|
E_Fm2_Smart_Data *sd;
|
||||||
E_Fm2_Region *region;
|
E_Fm2_Region *region;
|
||||||
Evas_Coord x, y, w, h, min_w, min_h;
|
Evas_Coord x, y, w, h, min_w, min_h;
|
||||||
Evas_Object *obj, *obj_icon;
|
Evas_Object *obj, *obj_icon, *rect;
|
||||||
E_Menu *menu;
|
E_Menu *menu;
|
||||||
E_Entry_Dialog *entry_dialog;
|
E_Entry_Dialog *entry_dialog;
|
||||||
Evas_Object *entry_widget;
|
Evas_Object *entry_widget;
|
||||||
|
@ -4762,13 +4762,20 @@ _e_fm2_icon_label_click(void *data, Evas_Object *obj __UNUSED__, const char *emi
|
||||||
static void
|
static void
|
||||||
_e_fm2_icon_realize(E_Fm2_Icon *ic)
|
_e_fm2_icon_realize(E_Fm2_Icon *ic)
|
||||||
{
|
{
|
||||||
|
Evas *e;
|
||||||
|
|
||||||
if (ic->realized) return;
|
if (ic->realized) return;
|
||||||
|
e = evas_object_evas_get(ic->sd->obj);
|
||||||
/* actually create evas objects etc. */
|
/* actually create evas objects etc. */
|
||||||
ic->realized = EINA_TRUE;
|
ic->realized = EINA_TRUE;
|
||||||
evas_event_freeze(evas_object_evas_get(ic->sd->obj));
|
evas_event_freeze(e);
|
||||||
ic->obj = edje_object_add(evas_object_evas_get(ic->sd->obj));
|
ic->obj = edje_object_add(e);
|
||||||
edje_object_freeze(ic->obj);
|
edje_object_freeze(ic->obj);
|
||||||
evas_object_smart_member_add(ic->obj, ic->sd->obj);
|
evas_object_smart_member_add(ic->obj, ic->sd->obj);
|
||||||
|
ic->rect = evas_object_rectangle_add(e);
|
||||||
|
evas_object_color_set(ic->rect, 0, 0, 0, 0);
|
||||||
|
evas_object_smart_member_add(ic->rect, ic->sd->obj);
|
||||||
|
evas_object_repeat_events_set(ic->rect, 1);
|
||||||
evas_object_stack_below(ic->obj, ic->sd->drop);
|
evas_object_stack_below(ic->obj, ic->sd->drop);
|
||||||
if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST)
|
if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST)
|
||||||
{
|
{
|
||||||
|
@ -4815,25 +4822,31 @@ _e_fm2_icon_realize(E_Fm2_Icon *ic)
|
||||||
"base/theme/fileman",
|
"base/theme/fileman",
|
||||||
"icon/variable");
|
"icon/variable");
|
||||||
}
|
}
|
||||||
|
evas_object_stack_above(ic->rect, ic->obj);
|
||||||
_e_fm2_icon_label_set(ic, ic->obj);
|
_e_fm2_icon_label_set(ic, ic->obj);
|
||||||
evas_object_clip_set(ic->obj, ic->sd->clip);
|
evas_object_clip_set(ic->obj, ic->sd->clip);
|
||||||
evas_object_move(ic->obj,
|
evas_object_move(ic->obj,
|
||||||
ic->sd->x + ic->x - ic->sd->pos.x,
|
ic->sd->x + ic->x - ic->sd->pos.x,
|
||||||
ic->sd->y + ic->y - ic->sd->pos.y);
|
ic->sd->y + ic->y - ic->sd->pos.y);
|
||||||
|
evas_object_move(ic->rect,
|
||||||
|
ic->sd->x + ic->x - ic->sd->pos.x,
|
||||||
|
ic->sd->y + ic->y - ic->sd->pos.y);
|
||||||
evas_object_resize(ic->obj, ic->w, ic->h);
|
evas_object_resize(ic->obj, ic->w, ic->h);
|
||||||
|
evas_object_resize(ic->rect, ic->w, ic->h);
|
||||||
|
|
||||||
evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic);
|
evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic);
|
||||||
evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic);
|
evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic);
|
||||||
evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic);
|
evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic);
|
||||||
evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic);
|
evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic);
|
||||||
evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic);
|
evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic);
|
||||||
edje_object_signal_callback_add(ic->obj, "e,action,label,click", "e", _e_fm2_icon_label_click, ic);
|
edje_object_signal_callback_add(ic->obj, "e,action,label,click", "e", _e_fm2_icon_label_click, ic);
|
||||||
|
|
||||||
_e_fm2_icon_icon_set(ic);
|
_e_fm2_icon_icon_set(ic);
|
||||||
|
|
||||||
edje_object_thaw(ic->obj);
|
edje_object_thaw(ic->obj);
|
||||||
evas_event_thaw(evas_object_evas_get(ic->sd->obj));
|
evas_event_thaw(e);
|
||||||
evas_object_show(ic->obj);
|
evas_object_show(ic->obj);
|
||||||
|
evas_object_show(ic->rect);
|
||||||
|
|
||||||
if (ic->selected)
|
if (ic->selected)
|
||||||
{
|
{
|
||||||
|
@ -4869,6 +4882,8 @@ _e_fm2_icon_unrealize(E_Fm2_Icon *ic)
|
||||||
ic->realized = EINA_FALSE;
|
ic->realized = EINA_FALSE;
|
||||||
evas_object_del(ic->obj);
|
evas_object_del(ic->obj);
|
||||||
ic->obj = NULL;
|
ic->obj = NULL;
|
||||||
|
evas_object_del(ic->rect);
|
||||||
|
ic->rect = NULL;
|
||||||
evas_object_del(ic->obj_icon);
|
evas_object_del(ic->obj_icon);
|
||||||
ic->obj_icon = NULL;
|
ic->obj_icon = NULL;
|
||||||
}
|
}
|
||||||
|
@ -5194,7 +5209,10 @@ _e_fm2_region_realize(E_Fm2_Region *rg)
|
||||||
EINA_LIST_FOREACH(rg->list, l, ic)
|
EINA_LIST_FOREACH(rg->list, l, ic)
|
||||||
{
|
{
|
||||||
if (ic->selected)
|
if (ic->selected)
|
||||||
evas_object_stack_below(ic->obj, ic->sd->drop);
|
{
|
||||||
|
evas_object_stack_below(ic->obj, ic->sd->drop);
|
||||||
|
evas_object_stack_above(ic->rect, ic->obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
edje_thaw();
|
edje_thaw();
|
||||||
}
|
}
|
||||||
|
@ -6191,6 +6209,7 @@ _e_fm2_dnd_finish(Evas_Object *obj, int refresh)
|
||||||
ic->drag.src = EINA_FALSE;
|
ic->drag.src = EINA_FALSE;
|
||||||
if (ic->drag.hidden) continue;
|
if (ic->drag.hidden) continue;
|
||||||
if (ic->obj) evas_object_show(ic->obj);
|
if (ic->obj) evas_object_show(ic->obj);
|
||||||
|
if (ic->rect) evas_object_show(ic->rect);
|
||||||
if (ic->obj_icon) evas_object_show(ic->obj_icon);
|
if (ic->obj_icon) evas_object_show(ic->obj_icon);
|
||||||
}
|
}
|
||||||
if (refresh) e_fm2_refresh(obj);
|
if (refresh) e_fm2_refresh(obj);
|
||||||
|
@ -7237,7 +7256,6 @@ _e_fm2_cb_icon_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
|
||||||
ic = data;
|
ic = data;
|
||||||
ev = event_info;
|
ev = event_info;
|
||||||
|
|
||||||
edje_object_message_signal_process(ic->obj);
|
|
||||||
edje_object_message_signal_process(ic->obj);
|
edje_object_message_signal_process(ic->obj);
|
||||||
|
|
||||||
_e_fm2_typebuf_hide(ic->sd->obj);
|
_e_fm2_typebuf_hide(ic->sd->obj);
|
||||||
|
@ -7259,6 +7277,7 @@ _e_fm2_cb_drag_finished_show(E_Fm2_Icon *ic)
|
||||||
{
|
{
|
||||||
ic->drag.dnd = ic->drag.src = EINA_FALSE;
|
ic->drag.dnd = ic->drag.src = EINA_FALSE;
|
||||||
if (ic->obj) evas_object_show(ic->obj);
|
if (ic->obj) evas_object_show(ic->obj);
|
||||||
|
if (ic->rect) evas_object_show(ic->rect);
|
||||||
if (ic->obj_icon) evas_object_show(ic->obj_icon);
|
if (ic->obj_icon) evas_object_show(ic->obj_icon);
|
||||||
ic->drag.dnd_end_timer = NULL;
|
ic->drag.dnd_end_timer = NULL;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
@ -7393,15 +7412,6 @@ _e_fm2_cb_icon_mouse_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
|
||||||
ev = event_info;
|
ev = event_info;
|
||||||
|
|
||||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||||
/* here we have some stupid checks to see if we're REALLY getting a mouse out or
|
|
||||||
* if some jackass is sending us bad events
|
|
||||||
* ticket #1324
|
|
||||||
*/
|
|
||||||
if (E_INSIDE(ev->output.x, ev->output.y - 10, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
|
|
||||||
E_INSIDE(ev->output.x - 10, ev->output.y, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
|
|
||||||
E_INSIDE(ev->output.x + 10, ev->output.y, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
|
|
||||||
E_INSIDE(ev->output.x, ev->output.y + 10, ic->sd->x + ic->x - ic->sd->pos.x, ic->sd->y + ic->y - ic->sd->pos.y, ic->w, ic->h) &&
|
|
||||||
evas_pointer_inside_get(evas_object_evas_get(ic->sd->obj))) return;
|
|
||||||
evas_object_smart_callback_call(ic->sd->obj, "icon_mouse_out", &ic->info);
|
evas_object_smart_callback_call(ic->sd->obj, "icon_mouse_out", &ic->info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7466,6 +7476,7 @@ _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
|
||||||
ic->sd->drag = EINA_TRUE;
|
ic->sd->drag = EINA_TRUE;
|
||||||
ic->drag.dnd = EINA_TRUE;
|
ic->drag.dnd = EINA_TRUE;
|
||||||
if (ic->obj) evas_object_hide(ic->obj);
|
if (ic->obj) evas_object_hide(ic->obj);
|
||||||
|
if (ic->rect) evas_object_hide(ic->rect);
|
||||||
if (ic->obj_icon) evas_object_hide(ic->obj_icon);
|
if (ic->obj_icon) evas_object_hide(ic->obj_icon);
|
||||||
ic->drag.start = EINA_FALSE;
|
ic->drag.start = EINA_FALSE;
|
||||||
evas_object_geometry_get(ic->obj, &x, &y, &w, &h);
|
evas_object_geometry_get(ic->obj, &x, &y, &w, &h);
|
||||||
|
@ -7507,6 +7518,7 @@ _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
|
||||||
|
|
||||||
ici->ic->drag.dnd = EINA_TRUE;
|
ici->ic->drag.dnd = EINA_TRUE;
|
||||||
if (ici->ic->obj) evas_object_hide(ici->ic->obj);
|
if (ici->ic->obj) evas_object_hide(ici->ic->obj);
|
||||||
|
if (ici->ic->rect) evas_object_hide(ici->ic->rect);
|
||||||
if (ici->ic->obj_icon) evas_object_hide(ici->ic->obj_icon);
|
if (ici->ic->obj_icon) evas_object_hide(ici->ic->obj_icon);
|
||||||
}
|
}
|
||||||
if (!sel) return;
|
if (!sel) return;
|
||||||
|
@ -8285,7 +8297,11 @@ _e_fm2_obj_icons_place(E_Fm2_Smart_Data *sd)
|
||||||
evas_object_move(ic->obj,
|
evas_object_move(ic->obj,
|
||||||
sd->x + ic->x - sd->pos.x,
|
sd->x + ic->x - sd->pos.x,
|
||||||
sd->y + ic->y - sd->pos.y);
|
sd->y + ic->y - sd->pos.y);
|
||||||
|
evas_object_move(ic->rect,
|
||||||
|
sd->x + ic->x - sd->pos.x,
|
||||||
|
sd->y + ic->y - sd->pos.y);
|
||||||
evas_object_resize(ic->obj, ic->w, ic->h);
|
evas_object_resize(ic->obj, ic->w, ic->h);
|
||||||
|
evas_object_resize(ic->rect, ic->w, ic->h);
|
||||||
_e_fm2_icon_thumb(ic, ic->obj_icon, 0);
|
_e_fm2_icon_thumb(ic, ic->obj_icon, 0);
|
||||||
if (_e_fm2_view_mode_get(ic->sd) != E_FM2_VIEW_MODE_LIST) continue;
|
if (_e_fm2_view_mode_get(ic->sd) != E_FM2_VIEW_MODE_LIST) continue;
|
||||||
/* FIXME: this is probably something that should be unnecessary,
|
/* FIXME: this is probably something that should be unnecessary,
|
||||||
|
|
Loading…
Reference in New Issue