[elm] Fix elm_shutdown via Edje externals.
authorGustavo Lima Chaves <glima@profusion.mobi>
Fri, 8 Jun 2012 21:05:37 +0000 (21:05 +0000)
committerGustavo Lima Chaves <glima@profusion.mobi>
Fri, 8 Jun 2012 21:05:37 +0000 (21:05 +0000)
An EVAS_CALLBACK_DEL event cb will take place before the smart del
function, so there'll be more action taking place after that, and Elm
has be on.

SVN revision: 71867

src/edje_externals/elm.c

index 80b7248..c07a0fb 100644 (file)
@@ -18,13 +18,22 @@ external_elm_init(void)
    elm_init(argc, argv);
 }
 
+static Eina_Bool
+_shutdown_idler(void *data)
+{
+   elm_shutdown();
+
+   return ECORE_CALLBACK_CANCEL;
+}
+
 static void
 external_elm_shutdown(void)
 {
    init_count--;
    DBG("elm_real_shutdown\n");
    if (init_count > 0) return;
-   elm_shutdown();
+
+   ecore_idler_add(_shutdown_idler, NULL);
 }
 
 static void