summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/glxcurrent.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 0d359f72b4a..36317383544 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -242,6 +242,10 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
return False;
}
+ if (oldGC == gc &&
+ gc->currentDrawable == draw && gc->currentReadable == read)
+ return True;
+
if (oldGC != &dummyContext) {
oldGC->vtable->unbind(oldGC, gc);
oldGC->currentDpy = 0;