summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuxuan Shui <yshuiv7@gmail.com>2018-06-24 17:45:08 (GMT)
committer Timothy Pearson <kb9vqf@pearsoncomputing.net>2018-06-24 17:45:08 (GMT)
commita94535c16eb309fdd23648511e0f552fccaf7173 (patch)
tree5fd7a7998b9a32c73d3c3aa08f8f436c924b8bb8
parent4ec011cd55856f3825672431b15c0318022c6948 (diff)
downloadtdebase-a94535c1.zip
tdebase-a94535c1.tar.gz
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 4cbfeb4..f30f43c 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; }