diff options
Diffstat (limited to 'src/glx/dri3_glx.c')
-rw-r--r-- | src/glx/dri3_glx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 9c15395adf8..e1dc5aa4a83 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -496,6 +496,13 @@ dri3_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) loader_dri3_wait_gl(draw); } +static void +dri_set_background_context(void *loaderPrivate) +{ + struct dri3_context *pcp = (struct dri3_context *)loaderPrivate; + __glXSetCurrentContext(&pcp->base); +} + /* The image loader extension record for DRI3 */ static const __DRIimageLoaderExtension imageLoaderExtension = { @@ -509,9 +516,16 @@ const __DRIuseInvalidateExtension dri3UseInvalidate = { .base = { __DRI_USE_INVALIDATE, 1 } }; +static const __DRIbackgroundCallableExtension driBackgroundCallable = { + .base = { __DRI_BACKGROUND_CALLABLE, 1 }, + + .setBackgroundContext = dri_set_background_context, +}; + static const __DRIextension *loader_extensions[] = { &imageLoaderExtension.base, &dri3UseInvalidate.base, + &driBackgroundCallable.base, NULL }; |