summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--twin/compton-tde/opengl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/twin/compton-tde/opengl.c b/twin/compton-tde/opengl.c
index 4cbfeb455..f30f43c31 100644
--- a/twin/compton-tde/opengl.c
+++ b/twin/compton-tde/opengl.c
@@ -811,6 +811,16 @@ glx_cmp_fbconfig(session_t *ps,
return -1;
if (!pfbc_b)
return 1;
+ int tmpattr;
+
+ // Avoid 10-bit colors
+ glXGetFBConfigAttrib(ps->dpy, pfbc_a->cfg, GLX_RED_SIZE, &tmpattr);
+ if (tmpattr != 8)
+ return -1;
+
+ glXGetFBConfigAttrib(ps->dpy, pfbc_b->cfg, GLX_RED_SIZE, &tmpattr);
+ if (tmpattr != 8)
+ return 1;
#define P_CMPATTR_LT(attr) { if ((result = glx_cmp_fbconfig_cmpattr(ps, pfbc_a, pfbc_b, (attr)))) return -result; }
#define P_CMPATTR_GT(attr) { if ((result = glx_cmp_fbconfig_cmpattr(ps, pfbc_a, pfbc_b, (attr)))) return result; }