compositor: Use EGL_WL_bind_wayland_display only if available

dev
Benjamin Franzke 14 years ago
parent eb7e12c73b
commit cdd9db7ed2
  1. 4
      compositor/compositor.c

@ -1853,6 +1853,8 @@ wlsc_compositor_init(struct wlsc_compositor *ec, struct wl_display *display)
wl_compositor_init(&ec->compositor, &compositor_interface, display); wl_compositor_init(&ec->compositor, &compositor_interface, display);
ec->shm = wl_shm_init(display, &shm_callbacks); ec->shm = wl_shm_init(display, &shm_callbacks);
if (strstr(eglQueryString(ec->display, EGL_EXTENSIONS),
"EGL_WL_bind_wayland_display"))
eglBindWaylandDisplayWL(ec->display, ec->wl_display); eglBindWaylandDisplayWL(ec->display, ec->wl_display);
wl_list_init(&ec->surface_list); wl_list_init(&ec->surface_list);
@ -1992,6 +1994,8 @@ int main(int argc, char *argv[])
wl_display_run(display); wl_display_run(display);
if (strstr(eglQueryString(ec->display, EGL_EXTENSIONS),
"EGL_WL_bind_wayland_display"))
eglUnbindWaylandDisplayWL(ec->display, display); eglUnbindWaylandDisplayWL(ec->display, display);
wl_display_destroy(display); wl_display_destroy(display);

Loading…
Cancel
Save