summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-10-26 04:41:59 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-10-26 04:41:59 +0000
commitf31332d6bebdd9c6e327c73fb9fb257577a98235 (patch)
tree97ff9cba65d3f93085b181c9b16b3f3b9502bda1 /legacy/evas/src/lib
parent53292d89ca31f2e628d211afb6bd1aaae10fc5cf (diff)
evas/event - don't loop continuosly as possible when event is frozen
SVN revision: 78499
Diffstat (limited to 'legacy/evas/src/lib')
-rw-r--r--legacy/evas/src/lib/canvas/evas_events.c93
1 files changed, 37 insertions, 56 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_events.c b/legacy/evas/src/lib/canvas/evas_events.c
index 8f57068..0bdbc47 100644
--- a/legacy/evas/src/lib/canvas/evas_events.c
+++ b/legacy/evas/src/lib/canvas/evas_events.c
@@ -680,16 +680,13 @@ _canvas_event_feed_mouse_down(Eo *eo_e, void *_pd, va_list *list)
680 _evas_event_framespace_adjust(eo_obj, &ev.canvas.x, &ev.canvas.y); 680 _evas_event_framespace_adjust(eo_obj, &ev.canvas.x, &ev.canvas.y);
681 _evas_event_havemap_adjust(eo_obj, obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); 681 _evas_event_havemap_adjust(eo_obj, obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
682 682
683 if (!e->is_frozen) 683 evas_object_event_callback_call(eo_obj, obj,
684 { 684 EVAS_CALLBACK_MOUSE_DOWN, &ev,
685 evas_object_event_callback_call(eo_obj, obj, 685 event_id);
686 EVAS_CALLBACK_MOUSE_DOWN, &ev, 686 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
687 event_id); 687 _evas_event_source_mouse_down_events(eo_obj, eo_e, &ev,
688 if ((obj->proxy.is_proxy) && (obj->proxy.src_events)) 688 event_id);
689 _evas_event_source_mouse_down_events(eo_obj, eo_e, &ev, 689 if (e->is_frozen || e->delete_me) break;
690 event_id);
691 }
692 if (e->delete_me) break;
693 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) 690 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
694 break; 691 break;
695 } 692 }
@@ -1314,15 +1311,12 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1314 ev2.canvas.y = e->pointer.y; 1311 ev2.canvas.y = e->pointer.y;
1315 _evas_event_framespace_adjust(eo_obj, &ev2.canvas.x, &ev2.canvas.y); 1312 _evas_event_framespace_adjust(eo_obj, &ev2.canvas.x, &ev2.canvas.y);
1316 _evas_event_havemap_adjust(eo_obj, obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); 1313 _evas_event_havemap_adjust(eo_obj, obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed);
1317 if (!e->is_frozen) 1314 evas_object_event_callback_call(eo_obj, obj,
1318 { 1315 EVAS_CALLBACK_MOUSE_OUT,
1319 evas_object_event_callback_call(eo_obj, obj, 1316 &ev2, event_id);
1320 EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); 1317 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1321 if ((obj->proxy.is_proxy) && 1318 _evas_event_source_mouse_out_events(eo_obj, &ev2,
1322 (obj->proxy.src_events)) 1319 event_id);
1323 _evas_event_source_mouse_out_events(eo_obj, &ev2,
1324 event_id);
1325 }
1326 } 1320 }
1327 } 1321 }
1328 if (e->delete_me) break; 1322 if (e->delete_me) break;
@@ -1375,7 +1369,7 @@ _canvas_event_feed_mouse_move(Eo *eo_e, void *_pd, va_list *list)
1375 _evas_post_event_callback_call(eo_e, e); 1369 _evas_post_event_callback_call(eo_e, e);
1376 if (ev.dev) _evas_device_unref(ev.dev); 1370 if (ev.dev) _evas_device_unref(ev.dev);
1377 } 1371 }
1378 _evas_unwalk(e); 1372 _evas_unwalk(e);
1379 return; 1373 return;
1380nogrep: 1374nogrep:
1381 { 1375 {
@@ -1624,18 +1618,14 @@ _canvas_event_feed_mouse_in(Eo *eo_e, void *_pd, va_list *list)
1624 if (!obj->mouse_in) 1618 if (!obj->mouse_in)
1625 { 1619 {
1626 obj->mouse_in = 1; 1620 obj->mouse_in = 1;
1627 if (!e->is_frozen) 1621 evas_object_event_callback_call(eo_obj, obj,
1628 { 1622 EVAS_CALLBACK_MOUSE_IN, &ev,
1629 evas_object_event_callback_call(eo_obj, obj, 1623 event_id);
1630 EVAS_CALLBACK_MOUSE_IN, 1624 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1631 &ev, event_id); 1625 _evas_event_source_mouse_in_events(eo_obj, &ev, event_id);
1632 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
1633 _evas_event_source_mouse_in_events(eo_obj, &ev,
1634 event_id);
1635 }
1636 } 1626 }
1637 } 1627 }
1638 if (e->delete_me) break; 1628 if (e->delete_me || e->is_frozen) break;
1639 } 1629 }
1640 /* free our old list of ins */ 1630 /* free our old list of ins */
1641 e->pointer.object.in = eina_list_free(e->pointer.object.in); 1631 e->pointer.object.in = eina_list_free(e->pointer.object.in);
@@ -1830,15 +1820,12 @@ _canvas_event_feed_multi_down(Eo *eo_e, void *_pd, va_list *list)
1830 ev.canvas.xsub = ev.canvas.x; // fixme - lost precision 1820 ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
1831 if (y != ev.canvas.y) 1821 if (y != ev.canvas.y)
1832 ev.canvas.ysub = ev.canvas.y; // fixme - lost precision 1822 ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
1833 if (!e->is_frozen) 1823 evas_object_event_callback_call(eo_obj, obj,
1834 { 1824 EVAS_CALLBACK_MULTI_DOWN, &ev,
1835 evas_object_event_callback_call(eo_obj, obj, 1825 event_id);
1836 EVAS_CALLBACK_MULTI_DOWN, &ev, 1826 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
1837 event_id); 1827 _evas_event_source_multi_down_events(eo_obj, &ev, event_id);
1838 if ((obj->proxy.is_proxy) || (obj->proxy.src_events)) 1828 if (e->delete_me || e->is_frozen) break;
1839 _evas_event_source_multi_down_events(eo_obj, &ev, event_id);
1840 }
1841 if (e->delete_me) break;
1842 } 1829 }
1843 if (copy) eina_list_free(copy); 1830 if (copy) eina_list_free(copy);
1844 _evas_post_event_callback_call(eo_e, e); 1831 _evas_post_event_callback_call(eo_e, e);
@@ -1939,15 +1926,11 @@ _canvas_event_feed_multi_up(Eo *eo_e, void *_pd, va_list *list)
1939 obj->mouse_grabbed--; 1926 obj->mouse_grabbed--;
1940 e->pointer.mouse_grabbed--; 1927 e->pointer.mouse_grabbed--;
1941 } 1928 }
1942 if (!e->is_frozen) 1929 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MULTI_UP,
1943 { 1930 &ev, event_id);
1944 evas_object_event_callback_call(eo_obj, obj, 1931 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
1945 EVAS_CALLBACK_MULTI_UP, &ev, 1932 _evas_event_source_multi_up_events(eo_obj, &ev, event_id);
1946 event_id); 1933 if (e->delete_me || e->is_frozen) break;
1947 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
1948 _evas_event_source_multi_up_events(eo_obj, &ev, event_id);
1949 }
1950 if (e->delete_me) break;
1951 } 1934 }
1952 if (copy) copy = eina_list_free(copy); 1935 if (copy) copy = eina_list_free(copy);
1953 if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(eo_e, timestamp, data)) 1936 if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(eo_e, timestamp, data))
@@ -2035,8 +2018,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
2035 EINA_LIST_FOREACH(copy, l, eo_obj) 2018 EINA_LIST_FOREACH(copy, l, eo_obj)
2036 { 2019 {
2037 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); 2020 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
2038 if ((!e->is_frozen) && 2021 if ((evas_object_clippers_is_visible(eo_obj, obj) ||
2039 (evas_object_clippers_is_visible(eo_obj, obj) ||
2040 obj->mouse_grabbed) && 2022 obj->mouse_grabbed) &&
2041 (!evas_event_passes_through(eo_obj, obj)) && 2023 (!evas_event_passes_through(eo_obj, obj)) &&
2042 (!evas_event_freezes_through(eo_obj, obj)) && 2024 (!evas_event_freezes_through(eo_obj, obj)) &&
@@ -2057,7 +2039,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
2057 if ((obj->proxy.is_proxy) || (obj->proxy.src_events)) 2039 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
2058 _evas_event_source_multi_move_events(eo_obj, &ev, event_id); 2040 _evas_event_source_multi_move_events(eo_obj, &ev, event_id);
2059 } 2041 }
2060 if (e->delete_me) break; 2042 if (e->delete_me || e->is_frozen) break;
2061 } 2043 }
2062 _evas_post_event_callback_call(eo_e, e); 2044 _evas_post_event_callback_call(eo_e, e);
2063 if (ev.dev) _evas_device_unref(ev.dev); 2045 if (ev.dev) _evas_device_unref(ev.dev);
@@ -2104,8 +2086,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
2104 /* in list */ 2086 /* in list */
2105 // FIXME: i don't think we need this 2087 // FIXME: i don't think we need this
2106 // evas_object_clip_recalc(eo_obj); 2088 // evas_object_clip_recalc(eo_obj);
2107 if ((!e->is_frozen) && 2089 if (evas_object_is_in_output_rect(eo_obj, obj, x, y, 1, 1) &&
2108 evas_object_is_in_output_rect(eo_obj, obj, x, y, 1, 1) &&
2109 (evas_object_clippers_is_visible(eo_obj, obj) || 2090 (evas_object_clippers_is_visible(eo_obj, obj) ||
2110 obj->mouse_grabbed) && 2091 obj->mouse_grabbed) &&
2111 eina_list_data_find(ins, eo_obj) && 2092 eina_list_data_find(ins, eo_obj) &&
@@ -2130,7 +2111,7 @@ _canvas_event_feed_multi_move(Eo *eo_e, void *_pd, va_list *list)
2130 if ((obj->proxy.is_proxy) || (obj->proxy.src_events)) 2111 if ((obj->proxy.is_proxy) || (obj->proxy.src_events))
2131 _evas_event_source_multi_move_events(eo_obj, &ev, event_id); 2112 _evas_event_source_multi_move_events(eo_obj, &ev, event_id);
2132 } 2113 }
2133 if (e->delete_me) break; 2114 if (e->delete_me || e->is_frozen) break;
2134 } 2115 }
2135 if (copy) copy = eina_list_free(copy); 2116 if (copy) copy = eina_list_free(copy);
2136 if (e->pointer.mouse_grabbed == 0) 2117 if (e->pointer.mouse_grabbed == 0)
@@ -2412,14 +2393,14 @@ _canvas_event_feed_hold(Eo *eo_e, void *_pd, va_list *list)
2412 EINA_LIST_FOREACH(copy, l, eo_obj) 2393 EINA_LIST_FOREACH(copy, l, eo_obj)
2413 { 2394 {
2414 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); 2395 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
2415 if ((!e->is_frozen) && !evas_event_freezes_through(eo_obj, obj)) 2396 if ( !evas_event_freezes_through(eo_obj, obj))
2416 { 2397 {
2417 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD, 2398 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_HOLD,
2418 &ev, event_id); 2399 &ev, event_id);
2419 if ((obj->proxy.is_proxy) && (obj->proxy.src_events)) 2400 if ((obj->proxy.is_proxy) && (obj->proxy.src_events))
2420 _evas_event_source_hold_events(eo_obj, &ev, event_id); 2401 _evas_event_source_hold_events(eo_obj, &ev, event_id);
2421 } 2402 }
2422 if (e->delete_me) break; 2403 if (e->delete_me || e->is_frozen) break;
2423 } 2404 }
2424 if (copy) copy = eina_list_free(copy); 2405 if (copy) copy = eina_list_free(copy);
2425 _evas_post_event_callback_call(eo_e, e); 2406 _evas_post_event_callback_call(eo_e, e);