summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-10-24 07:10:17 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-10-24 07:10:17 +0000
commit2960c5e5d4027e41a56e6bfdabb2030c81b7efcf (patch)
tree2f7ae8785ec03da6600df998c5e5ca6c686ffdad /legacy/evas/src/lib
parentd19f4a904a75c0dcf468721e9df71f86df314ca6 (diff)
evas/events - fix source event pass for map transformed.
SVN revision: 78389
Diffstat (limited to 'legacy/evas/src/lib')
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index 1d6c0b0..8941f91 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -165,19 +165,26 @@ _evas_object_source_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Callback_Type t
165 Evas_Object_Protected_Data *src = eo_data_get(src_eo, 165 Evas_Object_Protected_Data *src = eo_data_get(src_eo,
166 EVAS_OBJ_CLASS); 166 EVAS_OBJ_CLASS);
167 Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS); 167 Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
168 //FIXME: consider coord transformation for map.
169 Evas_Coord w1 = obj->cur.geometry.w; 168 Evas_Coord w1 = obj->cur.geometry.w;
170 Evas_Coord h1 = obj->cur.geometry.h; 169 Evas_Coord h1 = obj->cur.geometry.h;
171 Evas_Coord w2 = src->cur.geometry.w; 170 Evas_Coord w2 = src->cur.geometry.w;
172 Evas_Coord h2 = src->cur.geometry.h; 171 Evas_Coord h2 = src->cur.geometry.h;
173 Evas_Coord tx = e->pointer.x - obj->cur.geometry.x; 172 Evas_Coord tx;
174 Evas_Coord ty = e->pointer.y - obj->cur.geometry.y; 173 Evas_Coord ty;
175 if (w1 != w2) 174
176 tx = (Evas_Coord) ((float)tx * ((float)w2 / (float)w1)); 175 if (obj->cur.usemap && obj->cur.map)
177 if (h1 != h2) 176 evas_map_coords_get(obj->cur.map, e->pointer.x, e->pointer.y, &tx, &ty, 0);
178 ty = (Evas_Coord) ((float)ty * ((float)w2 / (float)w1)); 177 else
179 Evas_Coord x = src->cur.geometry.x + tx; 178 {
180 Evas_Coord y = src->cur.geometry.y + ty; 179 tx = e->pointer.x - obj->cur.geometry.x;
180 ty = e->pointer.y - obj->cur.geometry.y;
181 }
182
183 if (w1 != w2) tx = (Evas_Coord) ((float)tx * ((float)w2 / (float)w1));
184 if (h1 != h2) ty = (Evas_Coord) ((float)ty * ((float)w2 / (float)w1));
185 tx += src->cur.geometry.x;
186 ty += src->cur.geometry.y;
187
181 if (src->is_smart) 188 if (src->is_smart)
182 { 189 {
183 Eina_List *in = NULL, *l = NULL; 190 Eina_List *in = NULL, *l = NULL;
@@ -186,7 +193,7 @@ _evas_object_source_events(Evas_Object *eo_obj, Evas *eo_e, Evas_Callback_Type t
186 int no_rep = 0; 193 int no_rep = 0;
187 //Optimize Here: Keep this list in proxy image for up and move 194 //Optimize Here: Keep this list in proxy image for up and move
188 in = _evas_event_object_list_raw_in_get(eo_e, in, 195 in = _evas_event_object_list_raw_in_get(eo_e, in,
189 evas_object_smart_members_get_direct(src_eo), NULL, x, y, &no_rep, EINA_TRUE); 196 evas_object_smart_members_get_direct(src_eo), NULL, tx, ty, &no_rep, EINA_TRUE);
190 EINA_LIST_FOREACH(in, l, child_eo) 197 EINA_LIST_FOREACH(in, l, child_eo)
191 { 198 {
192 if (obj->delete_me || src->delete_me) return; 199 if (obj->delete_me || src->delete_me) return;