summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_events.c
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-11-28 17:00:35 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-28 17:03:32 +0900
commita969459b0b2e24e86eb020b805d0459cc497ddbb (patch)
treeb54e6eed5a1c1b7996bf718caf66cb5e1938629b /src/lib/evas/canvas/evas_events.c
parent18632bc8c776736acf06f7ca7c000b25d2b1cd5c (diff)
evas: simplify logic for better readability.
This also should solve some complain from clang static analyzer.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_events.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index 59ad975937..a86d6468ef 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -1212,7 +1212,8 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data)
1212 } 1212 }
1213 _evas_post_event_callback_call(eo_e, e); 1213 _evas_post_event_callback_call(eo_e, e);
1214 1214
1215 if (copy) copy = eina_list_free(copy); 1215 eina_list_free(copy);
1216
1216 if (e->pointer.inside) 1217 if (e->pointer.inside)
1217 { 1218 {
1218 Evas_Event_Mouse_In ev_in; 1219 Evas_Event_Mouse_In ev_in;
@@ -1372,7 +1373,7 @@ _canvas_event_feed_mouse_up(Eo *eo_e, void *_pd, va_list *list)
1372 break; 1373 break;
1373 } 1374 }
1374 } 1375 }
1375 if (copy) copy = eina_list_free(copy); 1376 eina_list_free(copy);
1376 e->last_mouse_up_counter++; 1377 e->last_mouse_up_counter++;
1377 _evas_post_event_callback_call(eo_e, e); 1378 _evas_post_event_callback_call(eo_e, e);
1378 if (ev.dev) _evas_device_unref(ev.dev); 1379 if (ev.dev) _evas_device_unref(ev.dev);
@@ -1497,7 +1498,7 @@ _canvas_event_feed_mouse_wheel(Eo *eo_e, void *_pd, va_list *list)
1497 if (e->delete_me || e->is_frozen) break; 1498 if (e->delete_me || e->is_frozen) break;
1498 } 1499 }
1499 } 1500 }
1500 if (copy) copy = eina_list_free(copy); 1501 eina_list_free(copy);
1501 _evas_post_event_callback_call(eo_e, e); 1502 _evas_post_event_callback_call(eo_e, e);
1502 1503
1503 if (ev.dev) _evas_device_unref(ev.dev); 1504 if (ev.dev) _evas_device_unref(ev.dev);
@@ -1626,7 +1627,8 @@ _canvas_event_feed_mouse_move_internal(Eo *eo_e, void *_pd, int x, int y, unsign
1626 ev.dev = _evas_device_top_get(eo_e); 1627 ev.dev = _evas_device_top_get(eo_e);
1627 if (ev.dev) _evas_device_ref(ev.dev); 1628 if (ev.dev) _evas_device_ref(ev.dev);
1628 1629
1629 if (copy) eina_list_free(copy); 1630 eina_list_free(copy);
1631
1630 while (outs) 1632 while (outs)
1631 { 1633 {
1632 Evas_Object *eo_obj; 1634 Evas_Object *eo_obj;
@@ -1773,7 +1775,8 @@ _canvas_event_feed_mouse_move_internal(Eo *eo_e, void *_pd, int x, int y, unsign
1773 _evas_object_event_new(); 1775 _evas_object_event_new();
1774 1776
1775 event_id2 = _evas_event_counter; 1777 event_id2 = _evas_event_counter;
1776 if (copy) copy = eina_list_free(copy); 1778 eina_list_free(copy);
1779
1777 /* go thru our current list of ins */ 1780 /* go thru our current list of ins */
1778 EINA_LIST_FOREACH(ins, l, eo_obj) 1781 EINA_LIST_FOREACH(ins, l, eo_obj)
1779 { 1782 {
@@ -1961,7 +1964,8 @@ nogrep:
1961 _evas_object_event_new(); 1964 _evas_object_event_new();
1962 1965
1963 event_id2 = _evas_event_counter; 1966 event_id2 = _evas_event_counter;
1964 if (copy) copy = eina_list_free(copy); 1967 eina_list_free(copy);
1968
1965 /* go thru our current list of ins */ 1969 /* go thru our current list of ins */
1966 EINA_LIST_FOREACH(newin, l, eo_obj) 1970 EINA_LIST_FOREACH(newin, l, eo_obj)
1967 { 1971 {
@@ -2185,7 +2189,8 @@ _canvas_event_feed_mouse_out(Eo *eo_e, void *_pd, va_list *list)
2185 } 2189 }
2186 obj->mouse_grabbed = 0; 2190 obj->mouse_grabbed = 0;
2187 } 2191 }
2188 if (copy) copy = eina_list_free(copy); 2192 eina_list_free(copy);
2193
2189 /* free our old list of ins */ 2194 /* free our old list of ins */
2190 e->pointer.object.in = eina_list_free(e->pointer.object.in); 2195 e->pointer.object.in = eina_list_free(e->pointer.object.in);
2191 e->pointer.mouse_grabbed = 0; 2196 e->pointer.mouse_grabbed = 0;
@@ -2275,7 +2280,8 @@ _canvas_event_feed_multi_down_internal(Evas *eo_e, void *_pd,
2275 _evas_event_source_multi_down_events(eo_obj, eo_e, &ev, event_id); 2280 _evas_event_source_multi_down_events(eo_obj, eo_e, &ev, event_id);
2276 if (e->delete_me || e->is_frozen) break; 2281 if (e->delete_me || e->is_frozen) break;
2277 } 2282 }
2278 if (copy) eina_list_free(copy); 2283 eina_list_free(copy);
2284
2279 _evas_post_event_callback_call(eo_e, e); 2285 _evas_post_event_callback_call(eo_e, e);
2280 /* update touch point's state to EVAS_TOUCH_POINT_STILL */ 2286 /* update touch point's state to EVAS_TOUCH_POINT_STILL */
2281 _evas_touch_point_update(eo_e, d, x, y, EVAS_TOUCH_POINT_STILL); 2287 _evas_touch_point_update(eo_e, d, x, y, EVAS_TOUCH_POINT_STILL);
@@ -2438,7 +2444,7 @@ _canvas_event_feed_multi_up_internal(Evas *eo_e, void *_pd,
2438 _evas_event_source_multi_up_events(eo_obj, eo_e, &ev, event_id); 2444 _evas_event_source_multi_up_events(eo_obj, eo_e, &ev, event_id);
2439 if (e->delete_me || e->is_frozen) break; 2445 if (e->delete_me || e->is_frozen) break;
2440 } 2446 }
2441 if (copy) copy = eina_list_free(copy); 2447 eina_list_free(copy);
2442 if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(eo_e, timestamp, data)) 2448 if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(eo_e, timestamp, data))
2443 _evas_post_event_callback_call(eo_e, e); 2449 _evas_post_event_callback_call(eo_e, e);
2444 /* remove released touch point from the touch point list */ 2450 /* remove released touch point from the touch point list */
@@ -2681,7 +2687,7 @@ _canvas_event_feed_multi_move_internal(Eo *eo_e, void *_pd, int d, int x,
2681 } 2687 }
2682 if (e->delete_me || e->is_frozen) break; 2688 if (e->delete_me || e->is_frozen) break;
2683 } 2689 }
2684 if (copy) copy = eina_list_free(copy); 2690 eina_list_free(copy);
2685 if (e->pointer.mouse_grabbed == 0) 2691 if (e->pointer.mouse_grabbed == 0)
2686 { 2692 {
2687 /* free our old list of ins */ 2693 /* free our old list of ins */
@@ -3049,7 +3055,7 @@ _canvas_event_feed_hold(Eo *eo_e, void *_pd, va_list *list)
3049 } 3055 }
3050 if (e->delete_me || e->is_frozen) break; 3056 if (e->delete_me || e->is_frozen) break;
3051 } 3057 }
3052 if (copy) copy = eina_list_free(copy); 3058 eina_list_free(copy);
3053 _evas_post_event_callback_call(eo_e, e); 3059 _evas_post_event_callback_call(eo_e, e);
3054 if (ev.dev) _evas_device_unref(ev.dev); 3060 if (ev.dev) _evas_device_unref(ev.dev);
3055 _evas_unwalk(e); 3061 _evas_unwalk(e);