summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-06-06 10:42:13 -0600
committerBrian Paul <[email protected]>2008-06-06 10:42:13 -0600
commit0a84d327de8258104b98b176c0eaf0fb6712a982 (patch)
treea1334d3f3e35639d5c9616cbecfadcc6e14ba3e4 /src/gallium/winsys
parente4fda51404a6a05c4047a639de4ccc3ea9678c2c (diff)
egl: open X display if needed
Diffstat (limited to 'src/gallium/winsys')
-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 07b3c0eb002..7bef46d560f 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;