summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-23 17:23:57 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-23 17:25:43 +0900
commit10ea93226215c4ab9c185b5a481052e728a26256 (patch)
treee8f9b54ebb3eaf2cc303b51b639799d494c4d827
parent87aa053e58f82473ff10b877ce61e0df38d7cb4a (diff)
elm init - fix init seq and quicklaunch as we shut down x before evas
... and others. this leads to crashes if x ops are busy in a thread or engine evas thread shutdown happens to call engine calls that then do x calls... should apply in general to wl too. fixes some segv's on shutdown given the new gl thread patches. @fix
-rw-r--r--src/lib/elementary/elm_main.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 743a9820fd..cc38bfe3b1 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -737,7 +737,6 @@ elm_quicklaunch_init(int argc,
737 737
738 eet_init(); 738 eet_init();
739 ecore_init(); 739 ecore_init();
740 edje_init();
741 740
742#ifdef HAVE_ELEMENTARY_EMAP 741#ifdef HAVE_ELEMENTARY_EMAP
743 emap_init(); 742 emap_init();
@@ -794,26 +793,26 @@ elm_quicklaunch_sub_init(int argc,
794 if (_elm_sub_init_count > 1) return _elm_sub_init_count; 793 if (_elm_sub_init_count > 1) return _elm_sub_init_count;
795 if (quicklaunch_on) 794 if (quicklaunch_on)
796 { 795 {
797 _elm_config_init(); 796// _elm_config_init();
798#ifdef SEMI_BROKEN_QUICKLAUNCH 797//#ifdef SEMI_BROKEN_QUICKLAUNCH
799 return _elm_sub_init_count; 798// return _elm_sub_init_count;
800#endif 799//#endif
801 } 800 }
802 801
803 if (!quicklaunch_on) 802 if (!quicklaunch_on)
804 { 803 {
805 ecore_app_args_set(argc, (const char **)argv); 804 ecore_app_args_set(argc, (const char **)argv);
806 evas_init(); 805 ecore_evas_init(); // FIXME: check errors
806 edje_init();
807 elm_color_class_init();
807 _elm_module_init(); 808 _elm_module_init();
808 _elm_config_init(); 809 _elm_config_init();
809 _elm_config_sub_init(); 810 _elm_config_sub_init();
810 ecore_evas_init(); // FIXME: check errors
811 ecore_imf_init(); 811 ecore_imf_init();
812 ecore_con_init(); 812 ecore_con_init();
813 ecore_con_url_init(); 813 ecore_con_url_init();
814 _elm_prefs_initted = _elm_prefs_init(); 814 _elm_prefs_initted = _elm_prefs_init();
815 _elm_ews_wm_init(); 815 _elm_ews_wm_init();
816 elm_color_class_init();
817 } 816 }
818 return _elm_sub_init_count; 817 return _elm_sub_init_count;
819} 818}
@@ -825,23 +824,25 @@ elm_quicklaunch_sub_shutdown(void)
825 if (_elm_sub_init_count > 0) return _elm_sub_init_count; 824 if (_elm_sub_init_count > 0) return _elm_sub_init_count;
826 if (quicklaunch_on) 825 if (quicklaunch_on)
827 { 826 {
828#ifdef SEMI_BROKEN_QUICKLAUNCH 827//#ifdef SEMI_BROKEN_QUICKLAUNCH
829 return _elm_sub_init_count; 828// return _elm_sub_init_count;
830#endif 829//#endif
831 } 830 }
832 if (!quicklaunch_on) 831 if (!quicklaunch_on)
833 { 832 {
834 _elm_win_shutdown(); 833 _elm_win_shutdown();
835 _elm_module_shutdown();
836 if (_elm_prefs_initted)
837 _elm_prefs_shutdown();
838 _elm_ews_wm_shutdown(); 834 _elm_ews_wm_shutdown();
839 ecore_con_url_shutdown(); 835 ecore_con_url_shutdown();
840 ecore_con_shutdown(); 836 ecore_con_shutdown();
841 ecore_imf_shutdown(); 837 ecore_imf_shutdown();
838 edje_shutdown();
842 ecore_evas_shutdown(); 839 ecore_evas_shutdown();
843 _elm_config_sub_shutdown(); 840 _elm_config_sub_shutdown();
844 evas_shutdown(); 841 _elm_config_shutdown();
842 _elm_module_shutdown();
843 if (_elm_prefs_initted)
844 _elm_prefs_shutdown();
845 elm_color_class_shutdown();
845 } 846 }
846 return _elm_sub_init_count; 847 return _elm_sub_init_count;
847} 848}
@@ -864,9 +865,6 @@ elm_quicklaunch_shutdown(void)
864 ELM_SAFE_FREE(_elm_lib_dir, eina_stringshare_del); 865 ELM_SAFE_FREE(_elm_lib_dir, eina_stringshare_del);
865 ELM_SAFE_FREE(_elm_appname, free); 866 ELM_SAFE_FREE(_elm_appname, free);
866 867
867 _elm_config_shutdown();
868 elm_color_class_shutdown();
869
870 ELM_SAFE_FREE(_elm_exit_handler, ecore_event_handler_del); 868 ELM_SAFE_FREE(_elm_exit_handler, ecore_event_handler_del);
871 869
872 _elm_theme_shutdown(); 870 _elm_theme_shutdown();
@@ -878,15 +876,14 @@ elm_quicklaunch_shutdown(void)
878 _elm_unneed_elocation(); 876 _elm_unneed_elocation();
879 _elm_unneed_ethumb(); 877 _elm_unneed_ethumb();
880 _elm_unneed_web(); 878 _elm_unneed_web();
881 eio_shutdown();
882 ecore_file_shutdown();
883 879
884#ifdef HAVE_ELEMENTARY_EMAP 880#ifdef HAVE_ELEMENTARY_EMAP
885 emap_shutdown(); 881 emap_shutdown();
886#endif 882#endif
887 _elm_emotion_shutdown(); 883 _elm_emotion_shutdown();
888 884
889 edje_shutdown(); 885 ecore_file_shutdown();
886 eio_init();
890 ecore_shutdown(); 887 ecore_shutdown();
891 eet_shutdown(); 888 eet_shutdown();
892 889