summaryrefslogtreecommitdiff
path: root/progs/es2/xegl/tri.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/es2/xegl/tri.c')
-rw-r--r--progs/es2/xegl/tri.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/progs/es2/xegl/tri.c b/progs/es2/xegl/tri.c
index 7729a09957..8981d8a7e2 100644
--- a/progs/es2/xegl/tri.c
+++ b/progs/es2/xegl/tri.c
@@ -334,14 +334,15 @@ make_x_window(Display *x_dpy, EGLDisplay egl_dpy,
exit(1);
}
+ /* sanity checks */
{
EGLint val;
eglQuerySurface(egl_dpy, *surfRet, EGL_WIDTH, &val);
assert(val == width);
eglQuerySurface(egl_dpy, *surfRet, EGL_HEIGHT, &val);
assert(val == height);
- eglQuerySurface(egl_dpy, *surfRet, EGL_SURFACE_TYPE, &val);
- assert(val == EGL_WINDOW_BIT);
+ assert(eglGetConfigAttrib(egl_dpy, config, EGL_SURFACE_TYPE, &val));
+ assert(val & EGL_WINDOW_BIT);
}
XFree(visInfo);