ecore: now you don't need to care if you are in the main loop or not when you call...
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 29 Jul 2011 14:59:43 +0000 (14:59 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 29 Jul 2011 14:59:43 +0000 (14:59 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@61897 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore/ecore.c

index b7e0fbd..d4d2f73 100644 (file)
@@ -225,6 +225,12 @@ ecore_main_loop_thread_safe_call(Ecore_Cb callback, void *data)
 {
    Ecore_Safe_Call *order;
 
+   if (eina_main_loop_is())
+     {
+        callback(data);
+        return ;
+     }
+
    order = malloc(sizeof (Ecore_Safe_Call));
    if (!order) return ;