aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-27 15:49:44 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-27 18:51:38 -0400
commit13edb19a6ca89da3fcbafd3be01d89251658178d (patch)
tree499b4a7463c894af827c77e56efdbe81071a01e3
parent776b81d499ae4430c0ebe5421b119c6b3355a1ce (diff)
Fix issue starting up client EGL on X11 backend
-rw-r--r--examples/layer-shell.c1
-rw-r--r--include/wlr/render/egl.h1
-rw-r--r--render/egl.c6
3 files changed, 5 insertions, 3 deletions
diff --git a/examples/layer-shell.c b/examples/layer-shell.c
index e559121e..70407888 100644
--- a/examples/layer-shell.c
+++ b/examples/layer-shell.c
@@ -247,7 +247,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL);
- wl_display_dispatch(display);
wl_display_roundtrip(display);
if (compositor == NULL) {
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 9f4c0334..b5f2d67c 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -20,6 +20,7 @@ struct wlr_egl {
bool swap_buffers_with_damage;
bool dmabuf_import;
bool dmabuf_import_modifiers;
+ bool bind_wayland_display;
} egl_exts;
struct wl_display *wl_display;
diff --git a/render/egl.c b/render/egl.c
index 315eb098..7201ac9f 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -160,8 +160,7 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
wlr_log(L_INFO, "Supported EGL extensions: %s", egl->exts_str);
wlr_log(L_INFO, "EGL vendor: %s", eglQueryString(egl->display, EGL_VENDOR));
- if (!check_egl_ext(egl->exts_str, "EGL_WL_bind_wayland_display") ||
- !check_egl_ext(egl->exts_str, "EGL_KHR_image_base")) {
+ if (!check_egl_ext(egl->exts_str, "EGL_KHR_image_base")) {
wlr_log(L_ERROR, "Required egl extensions not supported");
goto error;
}
@@ -177,6 +176,9 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
egl->egl_exts.dmabuf_import_modifiers =
check_egl_ext(egl->exts_str, "EGL_EXT_image_dma_buf_import_modifiers")
&& eglQueryDmaBufFormatsEXT && eglQueryDmaBufModifiersEXT;
+
+ egl->egl_exts.bind_wayland_display =
+ check_egl_ext(egl->exts_str, "EGL_WL_bind_wayland_display");
print_dmabuf_formats(egl);
return true;