Revert "improve efm mouse move detection (no more tooltips when cursor is in separate window)"

This reverts commit db72a84e58.

this whole idea was broken. I blame the british food/water/oxygen/etc. it broke click renaming and all kinds of other things. changing the edc (in latest elm/1.8) is a much better and more effective solution
This commit is contained in:
Mike Blumenkrantz 2013-12-10 09:30:28 -05:00
parent a61786b7a7
commit da931928e1
3 changed files with 25 additions and 42 deletions

View File

@ -191,7 +191,6 @@
2013-04-25 Mike Blumenkrantz 2013-04-25 Mike Blumenkrantz
* added deskmirror * added deskmirror
* improve efm mouse movement detection for icons
* add check for vmware window in another spot to disable key remapping * add check for vmware window in another spot to disable key remapping
2013-04-19 Mike Blumenkrantz 2013-04-19 Mike Blumenkrantz

1
NEWS
View File

@ -146,7 +146,6 @@ Improvements:
* desk flip animations moved to edje * desk flip animations moved to edje
* startup splash screen moved to compositor canvas * startup splash screen moved to compositor canvas
* added new modes for notification display on multiple monitors * added new modes for notification display on multiple monitors
* improve efm mouse movement detection for icons
* add check for vmware window in another spot to disable key remapping * add check for vmware window in another spot to disable key remapping
* border menu now has top-level item to set borderless state * border menu now has top-level item to set borderless state
* added dnd support for text/x-moz-url * added dnd support for text/x-moz-url

View File

@ -186,7 +186,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, *rect; Evas_Object *obj, *obj_icon;
E_Menu *menu; E_Menu *menu;
E_Entry_Dialog *entry_dialog; E_Entry_Dialog *entry_dialog;
Evas_Object *entry_widget; Evas_Object *entry_widget;
@ -4795,20 +4795,13 @@ _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) goto new_file; if (ic->realized) goto new_file;
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(e); evas_event_freeze(evas_object_evas_get(ic->sd->obj));
ic->obj = edje_object_add(e); ic->obj = edje_object_add(evas_object_evas_get(ic->sd->obj));
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)
{ {
@ -4855,31 +4848,25 @@ _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->rect, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic); 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_UP, _e_fm2_cb_icon_mouse_up, 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_MOVE, _e_fm2_cb_icon_mouse_move, 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_IN, _e_fm2_cb_icon_mouse_in, 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_OUT, _e_fm2_cb_icon_mouse_out, ic); evas_object_event_callback_add(ic->obj, 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(e); evas_event_thaw(evas_object_evas_get(ic->sd->obj));
evas_object_show(ic->obj); evas_object_show(ic->obj);
evas_object_show(ic->rect);
if (ic->selected) if (ic->selected)
{ {
@ -4927,15 +4914,13 @@ _e_fm2_icon_unrealize(E_Fm2_Icon *ic)
if (!ic->realized) return; if (!ic->realized) return;
/* delete evas objects */ /* delete evas objects */
ic->realized = EINA_FALSE; ic->realized = EINA_FALSE;
evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic);
evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic);
evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic);
evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic);
evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic);
evas_object_del(ic->obj); evas_object_del(ic->obj);
ic->obj = NULL; ic->obj = NULL;
evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic);
evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic);
evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic);
evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic);
evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic);
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;
} }
@ -5263,10 +5248,7 @@ _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();
} }
@ -6221,7 +6203,6 @@ _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);
@ -7327,6 +7308,7 @@ _e_fm2_cb_icon_mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
if (ic->sd->selecting) return; if (ic->sd->selecting) return;
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);
if ((ev->button == 1) && (!ic->drag.dnd)) if ((ev->button == 1) && (!ic->drag.dnd))
@ -7350,7 +7332,6 @@ _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;
@ -7495,6 +7476,15 @@ _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);
} }
@ -7600,7 +7590,6 @@ _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);
o = edje_object_add(e_util_comp_current_get()->evas); o = edje_object_add(e_util_comp_current_get()->evas);
@ -8408,11 +8397,7 @@ _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,