--- /dev/null
+diff --git a/src/modules/engines/wayland_egl/evas_engine.c b/src/modules/engines/wayland_egl/evas_engine.c
+index c6be47e..cbe10e4 100644
+--- a/src/modules/engines/wayland_egl/evas_engine.c
++++ b/src/modules/engines/wayland_egl/evas_engine.c
+@@ -2649,11 +2649,14 @@ eng_gl_surface_destroy(void *data, void *surface)
+
+ if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0;
+
+- ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context);
+- if (!ret)
++ if (re->win)
+ {
+- ERR("xxxMakeCurrent() failed!");
+- return 0;
++ ret = eglMakeCurrent(re->win->egl_disp, rsc->surface, rsc->surface, rsc->context);
++ if (!ret)
++ {
++ ERR("xxxMakeCurrent() failed!");
++ return 0;
++ }
+ }
+
+ // Delete FBO/RBO and Texture here
+@@ -2666,12 +2669,15 @@ eng_gl_surface_destroy(void *data, void *surface)
+ if (sfc->rb_stencil)
+ glDeleteRenderbuffers(1, &sfc->rb_stencil);
+
+- ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+- if (!ret)
++ if (re->win)
+ {
+- ERR("xxxMakeCurrent() failed!");
+- free(sfc);
+- return 0;
++ ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
++ if (!ret)
++ {
++ ERR("xxxMakeCurrent() failed!");
++ free(sfc);
++ return 0;
++ }
+ }
+
+ free(sfc);
+@@ -2747,12 +2753,15 @@ eng_gl_context_destroy(void *data, void *context)
+ if ((rsc = eina_tls_get(resource_key)) == EINA_FALSE) return 0;
+
+ // 1. Do a make current with the given context
+- ret = eglMakeCurrent(re->win->egl_disp, rsc->surface,
+- rsc->surface, ctx->context);
+- if (!ret)
++ if (re->win)
+ {
+- ERR("xxxMakeCurrent() failed!");
+- return 0;
++ ret = eglMakeCurrent(re->win->egl_disp, rsc->surface,
++ rsc->surface, ctx->context);
++ if (!ret)
++ {
++ ERR("xxxMakeCurrent() failed!");
++ return 0;
++ }
+ }
+
+ // 2. Delete the FBO
+@@ -2760,16 +2769,20 @@ eng_gl_context_destroy(void *data, void *context)
+ glDeleteFramebuffers(1, &ctx->context_fbo);
+
+ // 3. Destroy the Context
+- eglDestroyContext(re->win->egl_disp, ctx->context);
++ if (re->win)
++ eglDestroyContext(re->win->egl_disp, ctx->context);
+
+ ctx->context = EGL_NO_CONTEXT;
+
+- ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE,
+- EGL_NO_SURFACE, EGL_NO_CONTEXT);
+- if (!ret)
++ if (re->win)
+ {
+- ERR("xxxMakeCurrent() failed!");
+- return 0;
++ ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE,
++ EGL_NO_SURFACE, EGL_NO_CONTEXT);
++ if (!ret)
++ {
++ ERR("xxxMakeCurrent() failed!");
++ return 0;
++ }
+ }
+
+ if (current_evgl_ctx == ctx)
+@@ -2851,15 +2864,25 @@ eng_gl_make_current(void *data __UNUSED__, void *surface, void *context)
+ eng_window_use(NULL);
+
+ // Do a make current
+- ret = eglMakeCurrent(re->win->egl_disp,
+- re->win->egl_surface[0],
+- re->win->egl_surface[0],
+- ctx->context);
+-
+- if (!ret)
++ // FIXME: Skip makecurrent if re->win is NULL. This happens
++ // on wayland_egl because we free and set the re->win to NULL
++ // on ecore_evas_hide(). It's a workaround since the proper
++ // fix would be to not free the re->win on hide, but that
++ // will require a lot more changes.
++ if (!re->win)
++ return ret = 1;
++ else
+ {
+- ERR("xxxMakeCurrent() failed!");
+- return 0;
++ ret = eglMakeCurrent(re->win->egl_disp,
++ re->win->egl_surface[0],
++ re->win->egl_surface[0],
++ ctx->context);
++
++ if (!ret)
++ {
++ ERR("xxxMakeCurrent() failed!");
++ return 0;
++ }
+ }
+ }
+ }
--x-includes=${STAGING_INCDIR}/X11 \
--x-libraries=${STAGING_LIBDIR} \
"
-FILESEXTRAPATHS_prepend := "${THISDIR}/files_ecore"
-SRC_URI += "file://evas_check_engine.m4.patch "
\ No newline at end of file
+FILESEXTRAPATHS_prepend := "${THISDIR}/evas"
+
+SRC_URI += " \
+ file://evas_check_engine.m4.patch \
+ file://tizen-eecf2bbdad67ebb19e665a800d238205e67fc48a.patch \
+ "
+
+RDEPENDS_evas += "evas-engine-wayland-egl"
+RDEPENDS_evas += "evas-engine-wayland-shm"
+
+RDEPENDS_evas += "evas-loader-eet"
+RDEPENDS_evas += "evas-cserve2-eet"
+RDEPENDS_evas += "evas-saver-eet"
+RDEPENDS_evas += "evas-cserve2"
+RDEPENDS_evas += "evas-cserve2-bmp"
+RDEPENDS_evas += "evas-cserve2-eet"
+RDEPENDS_evas += "evas-cserve2-ico"
+RDEPENDS_evas += "evas-cserve2-jpeg"
+RDEPENDS_evas += "evas-cserve2-pmaps"
+RDEPENDS_evas += "evas-cserve2-png"
+RDEPENDS_evas += "evas-cserve2-psd"
+RDEPENDS_evas += "evas-cserve2-tga"
+RDEPENDS_evas += "evas-cserve2-tiff"
+RDEPENDS_evas += "evas-cserve2-wbmp"
+RDEPENDS_evas += "evas-cserve2-xpm"
+
+RDEPENDS_evas += "evas-loader-bmp"
+RDEPENDS_evas += "evas-loader-eet"
+RDEPENDS_evas += "evas-loader-generic"
+RDEPENDS_evas += "evas-loader-gif"
+RDEPENDS_evas += "evas-loader-ico"
+RDEPENDS_evas += "evas-loader-jpeg"
+RDEPENDS_evas += "evas-loader-pmaps"
+RDEPENDS_evas += "evas-loader-png"
+RDEPENDS_evas += "evas-loader-psd"
+RDEPENDS_evas += "evas-loader-tga"
+RDEPENDS_evas += "evas-loader-tiff"
+RDEPENDS_evas += "evas-loader-wbmp"
+RDEPENDS_evas += "evas-loader-xpm"
+
+RDEPENDS_evas += "evas-saver-eet"
+RDEPENDS_evas += "evas-saver-jpeg"
+RDEPENDS_evas += "evas-saver-png"
+RDEPENDS_evas += "evas-saver-tiff"
+RDEPENDS_evas += "evas-staticdev"
+RDEPENDS_evas += "evas-tests"