  #ifdef __cplusplus
  }
 diff --git a/src/wayland-egldisplay.c b/src/wayland-egldisplay.c
-index a7c0c12..2cdea91 100644
+index a7c0c12..e0323b0 100644
 --- a/src/wayland-egldisplay.c
 +++ b/src/wayland-egldisplay.c
-@@ -38,20 +38,26 @@ static struct wl_list wlEglDeviceDpyList = WL_LIST_INIT(&wlEglDeviceDpyList);
+@@ -38,20 +38,27 @@ static struct wl_list wlEglDeviceDpyList = WL_LIST_INIT(&wlEglDeviceDpyList);
  
  EGLBoolean wlEglIsWaylandDisplay(void *nativeDpy)
  {

+        got_symbols = 1;
+    }
+    first_pointer = *(void **) nativeDpy;
+    if (first_pointer == wdi_c || first_pointer == wdi_s)
+        return EGL_TRUE;
 
-    return ret;

 
 EGLBoolean wlEglIsValidNativeDisplayExport(void *data, void *nativeDpy)
diff --git a/src/wayland-eglsurface.c b/src/wayland-eglsurface.c
index 531eaf2..4ef6cca 100644
--- a/src/wayland-eglsurface.c
+++ b/src/wayland-eglsurface.c
@@ -57,10 +57,20 @@ EGLBoolean wlEglIsWlEglSurface(WlEglSurface *surface)
