summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_x11.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-07-29 17:19:07 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-08-07 19:16:59 +0100
commit2c7b6cf512a775a37677b1e467d2af952c449dae (patch)
treebe57dd5e6848a3a3d8e20769192f059e85e3aff1 /src/egl/drivers/dri2/platform_x11.c
parent45e110bad9d5d31eb67d7d32937aa5a752108df8 (diff)
downloadexternal_mesa3d-2c7b6cf512a775a37677b1e467d2af952c449dae.zip
external_mesa3d-2c7b6cf512a775a37677b1e467d2af952c449dae.tar.gz
external_mesa3d-2c7b6cf512a775a37677b1e467d2af952c449dae.tar.bz2
egl/x11: auth with xserver before attempting to open the dri module
No real change, apart from keeping the calls to the underlying winsys (x11) next to each other. Just like platform_wayland. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/egl/drivers/dri2/platform_x11.c')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index a251694..df08a8a 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1251,11 +1251,11 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
if (!dri2_x11_connect(dri2_dpy))
goto cleanup_conn;
- if (!dri2_load_driver(disp))
+ if (!dri2_x11_local_authenticate(disp))
goto cleanup_fd;
- if (!dri2_x11_local_authenticate(disp))
- goto cleanup_driver;
+ if (!dri2_load_driver(disp))
+ goto cleanup_fd;
if (dri2_dpy->dri2_minor >= 1) {
dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;