Enlightenment CVS committal
Author : metrics
Project : e17
Module : apps/e
Dir : e17/apps/e/src/modules/pager
Modified Files:
e_mod_main.c
Log Message:
Only send events for the correct pager desks (--FIXME's).
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/pager/e_mod_main.c,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -3 -r1.194 -r1.195
--- e_mod_main.c 15 Nov 2006 06:24:30 -0000 1.194
+++ e_mod_main.c 18 Nov 2006 05:40:29 -0000 1.195
@@ -56,6 +56,7 @@
unsigned char dragging : 1;
unsigned char just_dragged : 1;
Evas_Coord dnd_x, dnd_y;
+ Pager_Desk *active_drop_pd;
};
struct _Pager_Desk
@@ -1527,16 +1528,15 @@
evas_object_geometry_get(inst->pager->o_table, &xx, &yy, NULL, NULL);
e_box_align_pixel_offset_get(inst->gcc->o_box, &ox, &oy);
pd = _pager_desk_at_coord(inst->pager, x + xx + ox, y + yy + oy);
- /* FIXME: keep track which one its over so we only emit drag in/out
- * when it actually goes form one desk to another */
for (l = inst->pager->desks; l; l = l->next)
{
pd2 = l->data;
if (pd == pd2)
- edje_object_signal_emit(pd2->o_desk, "e,action,drag,in", "e");
- else
+ edje_object_signal_emit(pd2->o_desk, "e,action,drag,in", "e");
+ else if (pd2 == inst->pager->active_drop_pd)
edje_object_signal_emit(pd2->o_desk, "e,action,drag,out", "e");
}
+ inst->pager->active_drop_pd = pd;
}
static void
@@ -1573,14 +1573,17 @@
ev = event_info;
inst = data;
- /* FIXME: keep track which one its over so we only emit drag in/out
- * when it actually goes form one desk to another */
- for (l = inst->pager->desks; l; l = l->next)
+
+ for (l = inst->pager->desks; l && inst->pager->active_drop_pd; l = l->next)
{
Pager_Desk *pd;
pd = l->data;
- edje_object_signal_emit(pd->o_desk, "e,action,drag,out", "e");
+ if (pd == inst->pager->active_drop_pd)
+ {
+ edje_object_signal_emit(pd->o_desk, "e,action,drag,out", "e");
+ inst->pager->active_drop_pd = NULL;
+ }
}
e_gadcon_client_autoscroll_cb_set(inst->gcc, NULL, NULL);
@@ -1646,12 +1649,15 @@
}
}
}
- /* FIXME: keep track which one its over so we only emit drag in/out
- * when it actually goes form one desk to another */
- for (l = inst->pager->desks; l; l = l->next)
+
+ for (l = inst->pager->desks; l && inst->pager->active_drop_pd; l = l->next)
{
pd = l->data;
- edje_object_signal_emit(pd->o_desk, "e,action,drag,out", "e");
+ if (pd == inst->pager->active_drop_pd)
+ {
+ edje_object_signal_emit(pd->o_desk, "e,action,drag,out", "e");
+ inst->pager->active_drop_pd = NULL;
+ }
}
e_gadcon_client_autoscroll_cb_set(inst->gcc, NULL, NULL);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs