diff --git a/cogl/cogl/winsys/cogl-winsys-egl.c b/cogl/cogl/winsys/cogl-winsys-egl.c index ab25bd1bc..36122f2c4 100644 --- a/cogl/cogl/winsys/cogl-winsys-egl.c +++ b/cogl/cogl/winsys/cogl-winsys-egl.c @@ -1028,6 +1028,13 @@ _cogl_egl_create_image (CoglContext *ctx, if (target == EGL_NATIVE_PIXMAP_KHR) egl_ctx = EGL_NO_CONTEXT; else +#endif +#if COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT + /* The WL_bind_wayland_display spec states that EGL_NO_CONTEXT is to be used + * in conjunction with the EGL_WAYLAND_BUFFER_WL target */ + if (target == EGL_WAYLAND_BUFFER_WL) + egl_ctx = EGL_NO_CONTEXT; + else #endif egl_ctx = egl_display->egl_context;