 +        got_symbols = 1;
 +    }
 +    first_pointer = *(void **) nativeDpy;
-+    if (first_pointer == wdi_c || first_pointer == wdi_s)
++    if (first_pointer == wdi_c || first_pointer == wdi_s ||
++        first_pointer == &wl_display_interface)
 +        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..87a0eea 100644
--- a/src/wayland-eglsurface.c
+++ b/src/wayland-eglsurface.c
@@ -57,10 +57,20 @@ EGLBoolean wlEglIsWlEglSurface(WlEglSurface *surface)

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