summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/bin/e_fm.c65
3 files changed, 25 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 1636c3d48..dc475c8b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -191,7 +191,6 @@
1912013-04-25 Mike Blumenkrantz 1912013-04-25 Mike Blumenkrantz
192 192
193 * added deskmirror 193 * added deskmirror
194 * improve efm mouse movement detection for icons
195 * add check for vmware window in another spot to disable key remapping 194 * add check for vmware window in another spot to disable key remapping
196 195
1972013-04-19 Mike Blumenkrantz 1962013-04-19 Mike Blumenkrantz
diff --git a/NEWS b/NEWS
index 8fa52fc48..5d9dc6749 100644
--- a/NEWS
+++ b/NEWS
@@ -146,7 +146,6 @@ Improvements:
146 * desk flip animations moved to edje 146 * desk flip animations moved to edje
147 * startup splash screen moved to compositor canvas 147 * startup splash screen moved to compositor canvas
148 * added new modes for notification display on multiple monitors 148 * added new modes for notification display on multiple monitors
149 * improve efm mouse movement detection for icons
150 * add check for vmware window in another spot to disable key remapping 149 * add check for vmware window in another spot to disable key remapping
151 * border menu now has top-level item to set borderless state 150 * border menu now has top-level item to set borderless state
152 * added dnd support for text/x-moz-url 151 * added dnd support for text/x-moz-url
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 70f1eb388..5aa42497f 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -186,7 +186,7 @@ struct _E_Fm2_Icon
186 E_Fm2_Smart_Data *sd; 186 E_Fm2_Smart_Data *sd;
187 E_Fm2_Region *region; 187 E_Fm2_Region *region;
188 Evas_Coord x, y, w, h, min_w, min_h; 188 Evas_Coord x, y, w, h, min_w, min_h;
189 Evas_Object *obj, *obj_icon, *rect; 189 Evas_Object *obj, *obj_icon;
190 E_Menu *menu; 190 E_Menu *menu;
191 E_Entry_Dialog *entry_dialog; 191 E_Entry_Dialog *entry_dialog;
192 Evas_Object *entry_widget; 192 Evas_Object *entry_widget;
@@ -4795,20 +4795,13 @@ _e_fm2_icon_label_click(void *data, Evas_Object *obj __UNUSED__, const char *emi
4795static void 4795static void
4796_e_fm2_icon_realize(E_Fm2_Icon *ic) 4796_e_fm2_icon_realize(E_Fm2_Icon *ic)
4797{ 4797{
4798 Evas *e;
4799
4800 if (ic->realized) goto new_file; 4798 if (ic->realized) goto new_file;
4801 e = evas_object_evas_get(ic->sd->obj);
4802 /* actually create evas objects etc. */ 4799 /* actually create evas objects etc. */
4803 ic->realized = EINA_TRUE; 4800 ic->realized = EINA_TRUE;
4804 evas_event_freeze(e); 4801 evas_event_freeze(evas_object_evas_get(ic->sd->obj));
4805 ic->obj = edje_object_add(e); 4802 ic->obj = edje_object_add(evas_object_evas_get(ic->sd->obj));
4806 edje_object_freeze(ic->obj); 4803 edje_object_freeze(ic->obj);
4807 evas_object_smart_member_add(ic->obj, ic->sd->obj); 4804 evas_object_smart_member_add(ic->obj, ic->sd->obj);
4808 ic->rect = evas_object_rectangle_add(e);
4809 evas_object_color_set(ic->rect, 0, 0, 0, 0);
4810 evas_object_smart_member_add(ic->rect, ic->sd->obj);
4811 evas_object_repeat_events_set(ic->rect, 1);
4812 evas_object_stack_below(ic->obj, ic->sd->drop); 4805 evas_object_stack_below(ic->obj, ic->sd->drop);
4813 if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST) 4806 if (_e_fm2_view_mode_get(ic->sd) == E_FM2_VIEW_MODE_LIST)
4814 { 4807 {
@@ -4855,31 +4848,25 @@ _e_fm2_icon_realize(E_Fm2_Icon *ic)
4855 "base/theme/fileman", 4848 "base/theme/fileman",
4856 "icon/variable"); 4849 "icon/variable");
4857 } 4850 }
4858 evas_object_stack_above(ic->rect, ic->obj);
4859 _e_fm2_icon_label_set(ic, ic->obj); 4851 _e_fm2_icon_label_set(ic, ic->obj);
4860 evas_object_clip_set(ic->obj, ic->sd->clip); 4852 evas_object_clip_set(ic->obj, ic->sd->clip);
4861 evas_object_move(ic->obj, 4853 evas_object_move(ic->obj,
4862 ic->sd->x + ic->x - ic->sd->pos.x, 4854 ic->sd->x + ic->x - ic->sd->pos.x,
4863 ic->sd->y + ic->y - ic->sd->pos.y); 4855 ic->sd->y + ic->y - ic->sd->pos.y);
4864 evas_object_move(ic->rect,
4865 ic->sd->x + ic->x - ic->sd->pos.x,
4866 ic->sd->y + ic->y - ic->sd->pos.y);
4867 evas_object_resize(ic->obj, ic->w, ic->h); 4856 evas_object_resize(ic->obj, ic->w, ic->h);
4868 evas_object_resize(ic->rect, ic->w, ic->h);
4869 4857
4870 evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic); 4858 evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic);
4871 evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic); 4859 evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic);
4872 evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic); 4860 evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic);
4873 evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic); 4861 evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic);
4874 evas_object_event_callback_add(ic->rect, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic); 4862 evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic);
4875 edje_object_signal_callback_add(ic->obj, "e,action,label,click", "e", _e_fm2_icon_label_click, ic); 4863 edje_object_signal_callback_add(ic->obj, "e,action,label,click", "e", _e_fm2_icon_label_click, ic);
4876 4864
4877 _e_fm2_icon_icon_set(ic); 4865 _e_fm2_icon_icon_set(ic);
4878 4866
4879 edje_object_thaw(ic->obj); 4867 edje_object_thaw(ic->obj);
4880 evas_event_thaw(e); 4868 evas_event_thaw(evas_object_evas_get(ic->sd->obj));
4881 evas_object_show(ic->obj); 4869 evas_object_show(ic->obj);
4882 evas_object_show(ic->rect);
4883 4870
4884 if (ic->selected) 4871 if (ic->selected)
4885 { 4872 {
@@ -4927,15 +4914,13 @@ _e_fm2_icon_unrealize(E_Fm2_Icon *ic)
4927 if (!ic->realized) return; 4914 if (!ic->realized) return;
4928 /* delete evas objects */ 4915 /* delete evas objects */
4929 ic->realized = EINA_FALSE; 4916 ic->realized = EINA_FALSE;
4917 evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic);
4918 evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic);
4919 evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic);
4920 evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic);
4921 evas_object_event_callback_del_full(ic->obj, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic);
4930 evas_object_del(ic->obj); 4922 evas_object_del(ic->obj);
4931 ic->obj = NULL; 4923 ic->obj = NULL;
4932 evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic);
4933 evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic);
4934 evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic);
4935 evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic);
4936 evas_object_event_callback_del_full(ic->rect, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic);
4937 evas_object_del(ic->rect);
4938 ic->rect = NULL;
4939 evas_object_del(ic->obj_icon); 4924 evas_object_del(ic->obj_icon);
4940 ic->obj_icon = NULL; 4925 ic->obj_icon = NULL;
4941} 4926}
@@ -5263,10 +5248,7 @@ _e_fm2_region_realize(E_Fm2_Region *rg)
5263 EINA_LIST_FOREACH(rg->list, l, ic) 5248 EINA_LIST_FOREACH(rg->list, l, ic)
5264 { 5249 {
5265 if (ic->selected) 5250 if (ic->selected)
5266 { 5251 evas_object_stack_below(ic->obj, ic->sd->drop);
5267 evas_object_stack_below(ic->obj, ic->sd->drop);
5268 evas_object_stack_above(ic->rect, ic->obj);
5269 }
5270 } 5252 }
5271 edje_thaw(); 5253 edje_thaw();
5272} 5254}
@@ -6221,7 +6203,6 @@ _e_fm2_dnd_finish(Evas_Object *obj, int refresh)
6221 ic->drag.src = EINA_FALSE; 6203 ic->drag.src = EINA_FALSE;
6222 if (ic->drag.hidden) continue; 6204 if (ic->drag.hidden) continue;
6223 if (ic->obj) evas_object_show(ic->obj); 6205 if (ic->obj) evas_object_show(ic->obj);
6224 if (ic->rect) evas_object_show(ic->rect);
6225 if (ic->obj_icon) evas_object_show(ic->obj_icon); 6206 if (ic->obj_icon) evas_object_show(ic->obj_icon);
6226 } 6207 }
6227 if (refresh) e_fm2_refresh(obj); 6208 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
7327 7308
7328 if (ic->sd->selecting) return; 7309 if (ic->sd->selecting) return;
7329 edje_object_message_signal_process(ic->obj); 7310 edje_object_message_signal_process(ic->obj);
7311 edje_object_message_signal_process(ic->obj);
7330 7312
7331 _e_fm2_typebuf_hide(ic->sd->obj); 7313 _e_fm2_typebuf_hide(ic->sd->obj);
7332 if ((ev->button == 1) && (!ic->drag.dnd)) 7314 if ((ev->button == 1) && (!ic->drag.dnd))
@@ -7350,7 +7332,6 @@ _e_fm2_cb_drag_finished_show(E_Fm2_Icon *ic)
7350{ 7332{
7351 ic->drag.dnd = ic->drag.src = EINA_FALSE; 7333 ic->drag.dnd = ic->drag.src = EINA_FALSE;
7352 if (ic->obj) evas_object_show(ic->obj); 7334 if (ic->obj) evas_object_show(ic->obj);
7353 if (ic->rect) evas_object_show(ic->rect);
7354 if (ic->obj_icon) evas_object_show(ic->obj_icon); 7335 if (ic->obj_icon) evas_object_show(ic->obj_icon);
7355 ic->drag.dnd_end_timer = NULL; 7336 ic->drag.dnd_end_timer = NULL;
7356 return EINA_FALSE; 7337 return EINA_FALSE;
@@ -7495,6 +7476,15 @@ _e_fm2_cb_icon_mouse_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
7495 ev = event_info; 7476 ev = event_info;
7496 7477
7497 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; 7478 if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
7479 /* here we have some stupid checks to see if we're REALLY getting a mouse out or
7480 * if some jackass is sending us bad events
7481 * ticket #1324
7482 */
7483 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) &&
7484 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) &&
7485 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) &&
7486 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) &&
7487 evas_pointer_inside_get(evas_object_evas_get(ic->sd->obj))) return;
7498 evas_object_smart_callback_call(ic->sd->obj, "icon_mouse_out", &ic->info); 7488 evas_object_smart_callback_call(ic->sd->obj, "icon_mouse_out", &ic->info);
7499} 7489}
7500 7490
@@ -7600,7 +7590,6 @@ _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
7600 7590
7601 ici->ic->drag.dnd = EINA_TRUE; 7591 ici->ic->drag.dnd = EINA_TRUE;
7602 if (ici->ic->obj) evas_object_hide(ici->ic->obj); 7592 if (ici->ic->obj) evas_object_hide(ici->ic->obj);
7603 if (ici->ic->rect) evas_object_hide(ici->ic->rect);
7604 if (ici->ic->obj_icon) evas_object_hide(ici->ic->obj_icon); 7593 if (ici->ic->obj_icon) evas_object_hide(ici->ic->obj_icon);
7605 7594
7606 o = edje_object_add(e_util_comp_current_get()->evas); 7595 o = edje_object_add(e_util_comp_current_get()->evas);
@@ -8408,11 +8397,7 @@ _e_fm2_obj_icons_place(E_Fm2_Smart_Data *sd)
8408 evas_object_move(ic->obj, 8397 evas_object_move(ic->obj,
8409 sd->x + ic->x - sd->pos.x, 8398 sd->x + ic->x - sd->pos.x,
8410 sd->y + ic->y - sd->pos.y); 8399 sd->y + ic->y - sd->pos.y);
8411 evas_object_move(ic->rect,
8412 sd->x + ic->x - sd->pos.x,
8413 sd->y + ic->y - sd->pos.y);
8414 evas_object_resize(ic->obj, ic->w, ic->h); 8400 evas_object_resize(ic->obj, ic->w, ic->h);
8415 evas_object_resize(ic->rect, ic->w, ic->h);
8416 _e_fm2_icon_thumb(ic, ic->obj_icon, 0); 8401 _e_fm2_icon_thumb(ic, ic->obj_icon, 0);
8417 if (_e_fm2_view_mode_get(ic->sd) != E_FM2_VIEW_MODE_LIST) continue; 8402 if (_e_fm2_view_mode_get(ic->sd) != E_FM2_VIEW_MODE_LIST) continue;
8418 /* FIXME: this is probably something that should be unnecessary, 8403 /* FIXME: this is probably something that should be unnecessary,