Fix issue starting up client EGL on X11 backend

master
Drew DeVault 7 years ago
parent 776b81d499
commit 13edb19a6c

@ -247,7 +247,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (compositor == NULL) { if (compositor == NULL) {

@ -20,6 +20,7 @@ struct wlr_egl {
bool swap_buffers_with_damage; bool swap_buffers_with_damage;
bool dmabuf_import; bool dmabuf_import;
bool dmabuf_import_modifiers; bool dmabuf_import_modifiers;
bool bind_wayland_display;
} egl_exts; } egl_exts;
struct wl_display *wl_display; struct wl_display *wl_display;

@ -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, "Supported EGL extensions: %s", egl->exts_str);
wlr_log(L_INFO, "EGL vendor: %s", eglQueryString(egl->display, EGL_VENDOR)); wlr_log(L_INFO, "EGL vendor: %s", eglQueryString(egl->display, EGL_VENDOR));
if (!check_egl_ext(egl->exts_str, "EGL_WL_bind_wayland_display") || if (!check_egl_ext(egl->exts_str, "EGL_KHR_image_base")) {
!check_egl_ext(egl->exts_str, "EGL_KHR_image_base")) {
wlr_log(L_ERROR, "Required egl extensions not supported"); wlr_log(L_ERROR, "Required egl extensions not supported");
goto error; 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 = egl->egl_exts.dmabuf_import_modifiers =
check_egl_ext(egl->exts_str, "EGL_EXT_image_dma_buf_import_modifiers") check_egl_ext(egl->exts_str, "EGL_EXT_image_dma_buf_import_modifiers")
&& eglQueryDmaBufFormatsEXT && eglQueryDmaBufModifiersEXT; && eglQueryDmaBufFormatsEXT && eglQueryDmaBufModifiersEXT;
egl->egl_exts.bind_wayland_display =
check_egl_ext(egl->exts_str, "EGL_WL_bind_wayland_display");
print_dmabuf_formats(egl); print_dmabuf_formats(egl);
return true; return true;

Loading…
Cancel
Save