diff options
author | Benjamin Franzke <[email protected]> | 2011-06-11 22:07:02 +0200 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2011-06-12 08:56:35 -0400 |
commit | b8325fd2554aafde3d0b784b7944b1473af7d144 (patch) | |
tree | a5aa892c3792bc42a1d8ab6996a12b046f8fbd57 /src/egl/drivers/dri2/egl_dri2.c | |
parent | 9a00dd974699e369b1eb292103fbde8bc6adfb87 (diff) |
egl_dri2/wayland: Add support for EGL_DEFAULT_DISPLAY
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index ea8c8fba8c0..a9430055258 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -528,10 +528,24 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp) if (dri2_dpy->fd) close(dri2_dpy->fd); dlclose(dri2_dpy->driver); + + if (disp->PlatformDisplay == NULL) { + switch (disp->Platform) { #ifdef HAVE_X11_PLATFORM - if (disp->PlatformDisplay == NULL) - xcb_disconnect(dri2_dpy->conn); + case _EGL_PLATFORM_X11: + xcb_disconnect(dri2_dpy->conn); + break; +#endif +#ifdef HAVE_WAYLAND_PLATFORM + case _EGL_PLATFORM_WAYLAND: + wl_display_destroy(dri2_dpy->wl_dpy); + break; #endif + default: + break; + } + } + free(dri2_dpy); disp->DriverData = NULL; |