summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:11:07 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:17:58 -0800
commit0cd43b45d9fed2915dd8f91f57c003bd569b8160 (patch)
tree800ba367d00a915d9810e4b032a19c6a2a86b0a6 /src/lib/ecore_evas
parent0e8a20a0a6d3b12dbc492c07d061bb9b5b618b37 (diff)
ecore_evas: avoid crash during shutdown due to Ecore_Event queue.
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c10
-rw-r--r--src/lib/ecore_evas/ecore_evas_ews.c22
-rw-r--r--src/lib/ecore_evas/ecore_evas_extn.c5
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h1
4 files changed, 33 insertions, 5 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 8b53aab3a9..bca08a1142 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -573,8 +573,12 @@ ecore_evas_shutdown(void)
573 return _ecore_evas_init_count; 573 return _ecore_evas_init_count;
574 574
575 eina_log_timing(_ecore_evas_log_dom, 575 eina_log_timing(_ecore_evas_log_dom,
576 EINA_LOG_STATE_START, 576 EINA_LOG_STATE_START,
577 EINA_LOG_STATE_SHUTDOWN); 577 EINA_LOG_STATE_SHUTDOWN);
578
579#ifdef BUILD_ECORE_EVAS_EWS
580 _ecore_evas_ews_events_flush();
581#endif
578 582
579 while (ecore_evases) _ecore_evas_free(ecore_evases); 583 while (ecore_evases) _ecore_evas_free(ecore_evases);
580 584
@@ -590,7 +594,7 @@ ecore_evas_shutdown(void)
590 _ecore_evas_engine_shutdown(); 594 _ecore_evas_engine_shutdown();
591 if (_ecore_evas_async_events_fd) 595 if (_ecore_evas_async_events_fd)
592 ecore_main_fd_handler_del(_ecore_evas_async_events_fd); 596 ecore_main_fd_handler_del(_ecore_evas_async_events_fd);
593 597
594 ecore_fork_reset_callback_del(_ecore_evas_fork_cb, NULL); 598 ecore_fork_reset_callback_del(_ecore_evas_fork_cb, NULL);
595 599
596 eina_log_domain_unregister(_ecore_evas_log_dom); 600 eina_log_domain_unregister(_ecore_evas_log_dom);
diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c
index 199c1d8507..d67fa16563 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -705,6 +705,28 @@ _ecore_evas_ews_events_init(void)
705 ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE = ecore_event_type_new(); 705 ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE = ecore_event_type_new();
706} 706}
707 707
708void
709_ecore_evas_ews_events_flush(void)
710{
711 ecore_event_type_flush(ECORE_EVAS_EWS_EVENT_MANAGER_CHANGE,
712 ECORE_EVAS_EWS_EVENT_ADD,
713 ECORE_EVAS_EWS_EVENT_DEL,
714 ECORE_EVAS_EWS_EVENT_RESIZE,
715 ECORE_EVAS_EWS_EVENT_MOVE,
716 ECORE_EVAS_EWS_EVENT_SHOW,
717 ECORE_EVAS_EWS_EVENT_HIDE,
718 ECORE_EVAS_EWS_EVENT_FOCUS,
719 ECORE_EVAS_EWS_EVENT_UNFOCUS,
720 ECORE_EVAS_EWS_EVENT_RAISE,
721 ECORE_EVAS_EWS_EVENT_LOWER,
722 ECORE_EVAS_EWS_EVENT_ACTIVATE,
723 ECORE_EVAS_EWS_EVENT_ICONIFIED_CHANGE,
724 ECORE_EVAS_EWS_EVENT_MAXIMIZED_CHANGE,
725 ECORE_EVAS_EWS_EVENT_LAYER_CHANGE,
726 ECORE_EVAS_EWS_EVENT_FULLSCREEN_CHANGE,
727 ECORE_EVAS_EWS_EVENT_CONFIG_CHANGE);
728}
729
708static int 730static int
709_ecore_evas_ews_init(void) 731_ecore_evas_ews_init(void)
710{ 732{
diff --git a/src/lib/ecore_evas/ecore_evas_extn.c b/src/lib/ecore_evas/ecore_evas_extn.c
index 8c3dee0f59..141bd78363 100644
--- a/src/lib/ecore_evas/ecore_evas_extn.c
+++ b/src/lib/ecore_evas/ecore_evas_extn.c
@@ -11,6 +11,7 @@ EAPI int ECORE_EVAS_EXTN_CLIENT_DEL = 0;
11void 11void
12_ecore_evas_extn_init(void) 12_ecore_evas_extn_init(void)
13{ 13{
14 if (ECORE_EVAS_EXTN_CLIENT_ADD != 0) return ;
14 ECORE_EVAS_EXTN_CLIENT_ADD = ecore_event_type_new(); 15 ECORE_EVAS_EXTN_CLIENT_ADD = ecore_event_type_new();
15 ECORE_EVAS_EXTN_CLIENT_DEL = ecore_event_type_new(); 16 ECORE_EVAS_EXTN_CLIENT_DEL = ecore_event_type_new();
16} 17}
@@ -18,6 +19,6 @@ _ecore_evas_extn_init(void)
18void 19void
19_ecore_evas_extn_shutdown(void) 20_ecore_evas_extn_shutdown(void)
20{ 21{
21 ECORE_EVAS_EXTN_CLIENT_ADD = 0; 22 ecore_event_type_flush(ECORE_EVAS_EXTN_CLIENT_ADD,
22 ECORE_EVAS_EXTN_CLIENT_DEL = 0; 23 ECORE_EVAS_EXTN_CLIENT_DEL);
23} 24}
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index aa1d7953a7..74005035db 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -443,6 +443,7 @@ EAPI void _ecore_evas_window_available_profiles_free(Ecore_Evas *ee);
443 443
444#ifdef BUILD_ECORE_EVAS_EWS 444#ifdef BUILD_ECORE_EVAS_EWS
445void _ecore_evas_ews_events_init(void); 445void _ecore_evas_ews_events_init(void);
446void _ecore_evas_ews_events_flush(void);
446int _ecore_evas_ews_shutdown(void); 447int _ecore_evas_ews_shutdown(void);
447#endif 448#endif
448 449