It looks like mesa does some hackery to detect pointers to libwayland objects. In particular, in the function _eglNativePlatformDetectNativeDisplay in src/egl/main/egldisplay.c:
if (first_pointer == &wl_display_interface)
return _EGL_PLATFORM_WAYLAND;
But as far as I know, mesa does not break encapsulation anywhere else. So fixing this instance might be sufficient.
I'm not sure what the impact of this is.
After appropriate fixes in #5, weston-simple-egl now runs fine. So it seems the impact of this need not be big.
(I'm not sure what happens server side: this is not testable because of #3.)
It looks like mesa does some hackery to detect pointers to libwayland objects. In particular, in the function
_eglNativePlatformDetectNativeDisplay
insrc/egl/main/egldisplay.c
:But as far as I know, mesa does not break encapsulation anywhere else. So fixing this instance might be sufficient. I'm not sure what the impact of this is.