aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri2/platform_x11.c')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 931ee511f15..420f567651c 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -872,7 +872,12 @@ dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
if (dri2_dpy->dri2) {
- return dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1;
+ if (dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1) {
+ return EGL_TRUE;
+ }
+ /* Swap failed with a window drawable. */
+ _eglError(EGL_BAD_NATIVE_WINDOW, __FUNCTION__);
+ return EGL_FALSE;
} else {
assert(dri2_dpy->swrast);