summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuxuan Shui <yshuiv7@gmail.com>2018-06-24 12:45:08 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2018-06-24 12:45:08 -0500
commita94535c16eb309fdd23648511e0f552fccaf7173 (patch)
tree5fd7a7998b9a32c73d3c3aa08f8f436c924b8bb8
parent4ec011cd55856f3825672431b15c0318022c6948 (diff)
downloadtdebase-a94535c16eb309fdd23648511e0f552fccaf7173.tar.gz
tdebase-a94535c16eb309fdd23648511e0f552fccaf7173.zip
Avoid using 10bit FBConfigs
Fix weird color issue with Mesa 18.0
-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; }