mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
GLX: Add extra glXMakeContextCurrent () call to work around a DRI issue
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7808 Fixes #4499, #5387, #5170
This commit is contained in:
parent
c977f5cbb0
commit
f788e994a9
@ -232,6 +232,12 @@ gdk_x11_gl_context_glx_make_current (GdkGLContext *context,
|
||||
"Making GLX context %p current to drawable %lu",
|
||||
context, (unsigned long) drawable);
|
||||
|
||||
/* Work around a glitch, see
|
||||
* https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5281
|
||||
*/
|
||||
if (glXGetCurrentContext () != self->glx_context)
|
||||
glXMakeContextCurrent (dpy, None, None, NULL);
|
||||
|
||||
if (!glXMakeContextCurrent (dpy, drawable, drawable, self->glx_context))
|
||||
return FALSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user