From: Cedric BAIL Date: Thu, 21 Apr 2016 18:53:31 +0000 (-0700) Subject: ecore: make the main loop singleton initialized and available early on. X-Git-Tag: upstream/1.20.0~6674 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc7174262f7b58235129276b4744a48a8a3c7f4c;p=platform%2Fupstream%2Fefl.git ecore: make the main loop singleton initialized and available early on. --- diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index 2f1d780..1f31476 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -361,6 +361,9 @@ ecore_shutdown(void) } #endif + eo_del(_mainloop_singleton); + _mainloop_singleton = NULL; + if (_ecore_fps_debug) _ecore_fps_debug_shutdown(); _ecore_poller_shutdown(); _ecore_animator_shutdown(); diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index dd7c64f..aac6a54 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -1159,6 +1159,8 @@ _ecore_main_loop_init(void) #endif detect_time_changes_start(); + + _mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL); } void @@ -2709,7 +2711,7 @@ _ecore_main_win32_select(int nfds EINA_UNUSED, #endif -static Eo *_mainloop_singleton = NULL; +Eo *_mainloop_singleton = NULL; EAPI Eo *ecore_main_loop_get(void) { diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 7e90832..547a947 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -363,6 +363,7 @@ GENERIC_ALLOC_FREE_HEADER(Ecore_Win32_Handler, ecore_win32_handler); #undef GENERIC_ALLOC_FREE_HEADER +extern Eo *_mainloop_singleton; extern Eo *_ecore_parent; #define ECORE_PARENT_CLASS ecore_parent_class_get() EAPI const Eo_Class *ecore_parent_class_get(void) EINA_CONST;