summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:16:56 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:17:58 -0800
commit93b63b48e862c1ee5c217abeede05a5533c96ed7 (patch)
tree622e05637c4d8f585a0f5581ea8994e4031b61a0 /src/lib
parentaef1ee96e854cc0e4991559c9346288c5cd82c38 (diff)
elementary: avoid crash during shutdown due to Ecore_Event queue.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/elm_config.c2
-rw-r--r--src/lib/elementary/elm_main.c14
-rw-r--r--src/lib/elementary/elm_sys_notify.c7
-rw-r--r--src/lib/elementary/elm_systray.c2
-rw-r--r--src/lib/elementary/elm_thumb.c6
5 files changed, 22 insertions, 9 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 269c5d3cf3..3510ba12f5 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -3785,6 +3785,8 @@ _elm_config_init(void)
3785void 3785void
3786_elm_config_sub_shutdown(void) 3786_elm_config_sub_shutdown(void)
3787{ 3787{
3788 ecore_event_type_flush(ELM_EVENT_CONFIG_ALL_CHANGED);
3789
3788#ifdef HAVE_ELEMENTARY_X 3790#ifdef HAVE_ELEMENTARY_X
3789 if (ecore_x_display_get()) ecore_x_shutdown(); 3791 if (ecore_x_display_get()) ecore_x_shutdown();
3790#endif 3792#endif
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 60514bcabd..42bca8c7f2 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -672,11 +672,11 @@ elm_quicklaunch_init(int argc,
672 672
673 memset(_elm_policies, 0, sizeof(_elm_policies)); 673 memset(_elm_policies, 0, sizeof(_elm_policies));
674 if (!ELM_EVENT_POLICY_CHANGED) 674 if (!ELM_EVENT_POLICY_CHANGED)
675 ELM_EVENT_POLICY_CHANGED = ecore_event_type_new(); 675 {
676 if (!ELM_EVENT_PROCESS_BACKGROUND) 676 ELM_EVENT_POLICY_CHANGED = ecore_event_type_new();
677 ELM_EVENT_PROCESS_BACKGROUND = ecore_event_type_new(); 677 ELM_EVENT_PROCESS_BACKGROUND = ecore_event_type_new();
678 if (!ELM_EVENT_PROCESS_FOREGROUND) 678 ELM_EVENT_PROCESS_FOREGROUND = ecore_event_type_new();
679 ELM_EVENT_PROCESS_FOREGROUND = ecore_event_type_new(); 679 }
680 680
681 if (!ecore_file_init()) 681 if (!ecore_file_init())
682 ERR("Elementary cannot init ecore_file"); 682 ERR("Elementary cannot init ecore_file");
@@ -780,6 +780,10 @@ elm_quicklaunch_shutdown(void)
780 780
781 eina_log_timing(_elm_log_dom, EINA_LOG_STATE_STOP, EINA_LOG_STATE_SHUTDOWN); 781 eina_log_timing(_elm_log_dom, EINA_LOG_STATE_STOP, EINA_LOG_STATE_SHUTDOWN);
782 782
783 ecore_event_type_flush(ELM_EVENT_POLICY_CHANGED,
784 ELM_EVENT_PROCESS_BACKGROUND,
785 ELM_EVENT_PROCESS_FOREGROUND);
786
783 if (pfx) eina_prefix_free(pfx); 787 if (pfx) eina_prefix_free(pfx);
784 pfx = NULL; 788 pfx = NULL;
785 ELM_SAFE_FREE(_elm_data_dir, eina_stringshare_del); 789 ELM_SAFE_FREE(_elm_data_dir, eina_stringshare_del);
diff --git a/src/lib/elementary/elm_sys_notify.c b/src/lib/elementary/elm_sys_notify.c
index 0b3597275e..c7a2dcbd06 100644
--- a/src/lib/elementary/elm_sys_notify.c
+++ b/src/lib/elementary/elm_sys_notify.c
@@ -208,8 +208,11 @@ _elm_sys_notify_singleton_get(Eo *obj EINA_UNUSED,
208EOLIAN static void 208EOLIAN static void
209_elm_sys_notify_class_constructor(Efl_Class *klass EINA_UNUSED) 209_elm_sys_notify_class_constructor(Efl_Class *klass EINA_UNUSED)
210{ 210{
211 ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED = ecore_event_type_new(); 211 if (ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED == 0)
212 ELM_EVENT_SYS_NOTIFY_ACTION_INVOKED = ecore_event_type_new(); 212 {
213 ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED = ecore_event_type_new();
214 ELM_EVENT_SYS_NOTIFY_ACTION_INVOKED = ecore_event_type_new();
215 }
213} 216}
214 217
215/*============================================================================* 218/*============================================================================*
diff --git a/src/lib/elementary/elm_systray.c b/src/lib/elementary/elm_systray.c
index 45ca4696da..d8158241c1 100644
--- a/src/lib/elementary/elm_systray.c
+++ b/src/lib/elementary/elm_systray.c
@@ -491,6 +491,8 @@ _elm_unneed_systray(void)
491{ 491{
492 if (!_elm_need_systray) return; 492 if (!_elm_need_systray) return;
493 493
494 ecore_event_type_flush(ELM_EVENT_SYSTRAY_READY);
495
494 _elm_need_systray = EINA_FALSE; 496 _elm_need_systray = EINA_FALSE;
495 497
496 eldbus_service_interface_unregister(_iface); 498 eldbus_service_interface_unregister(_iface);
diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c
index 205a033653..e6e508492c 100644
--- a/src/lib/elementary/elm_thumb.c
+++ b/src/lib/elementary/elm_thumb.c
@@ -500,7 +500,8 @@ _elm_unneed_ethumb(void)
500 _elm_ethumb_client = NULL; 500 _elm_ethumb_client = NULL;
501 } 501 }
502 ethumb_client_shutdown(); 502 ethumb_client_shutdown();
503 ELM_ECORE_EVENT_ETHUMB_CONNECT = 0; 503
504 ecore_event_type_flush(ELM_ECORE_EVENT_ETHUMB_CONNECT);
504} 505}
505 506
506static Eina_Bool 507static Eina_Bool
@@ -519,7 +520,8 @@ elm_need_ethumb(void)
519 if (_elm_need_ethumb) return EINA_TRUE; 520 if (_elm_need_ethumb) return EINA_TRUE;
520 _elm_need_ethumb = EINA_TRUE; 521 _elm_need_ethumb = EINA_TRUE;
521 522
522 ELM_ECORE_EVENT_ETHUMB_CONNECT = ecore_event_type_new(); 523 if (ELM_ECORE_EVENT_ETHUMB_CONNECT == 0)
524 ELM_ECORE_EVENT_ETHUMB_CONNECT = ecore_event_type_new();
523 ethumb_client_init(); 525 ethumb_client_init();
524 526
525 return EINA_TRUE; 527 return EINA_TRUE;