summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-06 10:42:13 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-06 10:42:13 -0600
commit0a84d327de8258104b98b176c0eaf0fb6712a982 (patch)
treea1334d3f3e35639d5c9616cbecfadcc6e14ba3e4
parente4fda51404a6a05c4047a639de4ccc3ea9678c2c (diff)
egl: open X display if needed
-rw-r--r--src/gallium/winsys/egl_xlib/egl_xlib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/winsys/egl_xlib/egl_xlib.c b/src/gallium/winsys/egl_xlib/egl_xlib.c
index 07b3c0eb00..7bef46d560 100644
--- a/src/gallium/winsys/egl_xlib/egl_xlib.c
+++ b/src/gallium/winsys/egl_xlib/egl_xlib.c
@@ -573,6 +573,10 @@ _eglMain(_EGLDisplay *dpy, const char *args)
if (!xdrv)
return NULL;
+ if (!dpy->Xdpy) {
+ dpy->Xdpy = XOpenDisplay(NULL);
+ }
+
_eglInitDriverFallbacks(&xdrv->Base);
xdrv->Base.API.Initialize = xlib_eglInitialize;
xdrv->Base.API.Terminate = xlib_eglTerminate;