Adding missing wayland initialization.
[platform/framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_main.cpp
index 61c6e76..5c4ffcd 100755 (executable)
@@ -37,6 +37,8 @@
 
 #ifdef HAVE_ECORE_X
 #include <Ecore_X.h>
+#else
+#include <Ecore_Wayland.h>
 #endif
 
 static int _ewkInitCount = 0;
@@ -89,6 +91,11 @@ int ewk_init(void)
         CRITICAL("could not init ecore_x.");
         goto error_ecore_x;
     }
+#else
+    if(!ecore_wl_init(0)) {
+        CRITICAL("could not init ecore_wl.");
+        goto error_ecore_wl;
+    }
 #endif
 
     g_type_init();
@@ -103,6 +110,9 @@ int ewk_init(void)
 #ifdef HAVE_ECORE_X
 error_ecore_x:
     ecore_imf_shutdown();
+#else
+error_ecore_wl:
+    ecore_imf_shutdown();
 #endif
 error_ecore_imf:
     ecore_evas_shutdown();