openbsd-ports/x11/compton/patches/patch-src_opengl_c
thfr 177e19c52e fix vsync drm by using correct drm path; by mrme0w _aT_ protonmail DOT ch,
thanks! While here take MAINTAINER. ok sthen@, jca@
2019-05-24 17:43:05 +00:00

27 lines
836 B
Plaintext

$OpenBSD: patch-src_opengl_c,v 1.2 2019/05/24 17:43:05 thfr Exp $
https://github.com/yshui/compton/commit/bf29b2d
Avoid using 10bit FBConfigs
Fix weird color issue with Mesa 18.0
Index: src/opengl.c
--- src/opengl.c.orig
+++ src/opengl.c
@@ -497,6 +497,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; }