unbreak pager and mouse wheel.

pagers should not rely on events on the edje object as it might get
lots of event replicas if there is a chain of swallows/groups/smarts
and they repeat events.

the new theme exports an e.eventarea part that will get the events and
pager will try to use it, if not fallback to the old behavior.

I cannot test this now, please say if it does not work.



SVN revision: 40616
This commit is contained in:
Gustavo Sverzut Barbieri 2009-05-13 11:38:12 +00:00
parent 5c7dec69a6
commit 609964ff1a
2 changed files with 13 additions and 8 deletions

View File

@ -7522,7 +7522,7 @@ collections { /* begin the collection of edje groups that are in this file */
color: 255 255 255 255;
}
}
part { name: "over3";
part { name: "e.eventarea";
type: RECT;
mouse_events: 1;
repeat_events: 1;
@ -7586,14 +7586,14 @@ collections { /* begin the collection of edje groups that are in this file */
program { name: "name_show";
signal: "mouse,in";
source: "over3";
source: "e.eventarea";
action: STATE_SET "active" 0.0;
transition: SINUSOIDAL 0.1;
target: "e.text.label";
}
program { name: "name_hide";
signal: "mouse,out";
source: "over3";
source: "e.eventarea";
action: STATE_SET "default" 0.0;
transition: SINUSOIDAL 0.2;
target: "e.text.label";

View File

@ -343,7 +343,7 @@ static Pager_Desk *
_pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos)
{
Pager_Desk *pd;
Evas_Object *o;
Evas_Object *o, *evo;
E_Border_List *bl;
E_Border *bd;
@ -368,13 +368,18 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos)
e_table_pack(p->o_table, o, xpos, ypos, 1, 1);
e_table_pack_options_set(o, 1, 1, 1, 1, 0.5, 0.5, 0, 0, -1, -1);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
evo = (Evas_Object *)edje_object_part_object_get(o, "e.eventarea");
if (!evo)
evo = o;
evas_object_event_callback_add(evo, EVAS_CALLBACK_MOUSE_DOWN,
_pager_desk_cb_mouse_down, pd);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP,
evas_object_event_callback_add(evo, EVAS_CALLBACK_MOUSE_UP,
_pager_desk_cb_mouse_up, pd);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE,
evas_object_event_callback_add(evo, EVAS_CALLBACK_MOUSE_MOVE,
_pager_desk_cb_mouse_move, pd);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_WHEEL,
evas_object_event_callback_add(evo, EVAS_CALLBACK_MOUSE_WHEEL,
_pager_desk_cb_mouse_wheel, pd);
evas_object_show(o);