compositor: Set EGL_PLATFORM env variable for each backend.
I may have missed something, but - since the Wayland compositor
already picks a platform backend, opens a connection and initializes the
backend specific display data structure it doesn't make sense
to let egl pick a platform. If it picks a different one the
display specific data structure will most likely not match.
Thus determine the platform in the Wayland rendering backend by setting
the EGL_PLATFORM env variable.
For the client any other platform than 'wayland' doesn't seem to make
sense.
I'm not sure if I've got the the platform ofr openfwd right.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
diff --git a/compositor/compositor-wayland.c b/compositor/compositor-wayland.c
index 1a53e8d..6cd02ed 100644
--- a/compositor/compositor-wayland.c
+++ b/compositor/compositor-wayland.c
@@ -111,6 +111,7 @@
EGL_NONE
};
+ setenv("EGL_PLATFORM", "wayland", 1);
c->base.display = eglGetDisplay(c->parent.display);
if (c->base.display == NULL) {
fprintf(stderr, "failed to create display\n");