ecore: make the main loop singleton initialized and available early on.
authorCedric BAIL <cedric@osg.samsung.com>
Thu, 21 Apr 2016 18:53:31 +0000 (11:53 -0700)
committerCedric BAIL <cedric@osg.samsung.com>
Thu, 21 Apr 2016 19:07:50 +0000 (12:07 -0700)
src/lib/ecore/ecore.c
src/lib/ecore/ecore_main.c
src/lib/ecore/ecore_private.h

index 2f1d780..1f31476 100644 (file)
@@ -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();
index dd7c64f..aac6a54 100644 (file)
@@ -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)
 {
index 7e90832..547a947 100644 (file)
@@ -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;