diff --git a/src/x11_window.c b/src/x11_window.c index ccd99a60..a12e07b0 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -128,6 +128,8 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) GLXFBConfig* fbconfigs; _GLFWfbconfig* result; int i, count = 0; + const char* vendor; + GLboolean trustWindowBit = GL_TRUE; *found = 0; @@ -141,6 +143,11 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) } } + vendor = glXGetClientString(_glfwLibrary.X11.display, GLX_VENDOR); + + if (strcmp(vendor, "Chromium") == 0) + trustWindowBit = GL_FALSE; + if (window->GLX.SGIX_fbconfig) { fbconfigs = window->GLX.ChooseFBConfigSGIX(_glfwLibrary.X11.display, @@ -192,10 +199,15 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) continue; } - if (!(getFBConfigAttrib(window, fbconfigs[i], GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT)) + if (!(getFBConfigAttrib(window, + fbconfigs[i], + GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT)) { - // Only consider window GLXFBConfigs - continue; + if (trustWindowBit) + { + // Only consider window GLXFBConfigs + continue; + } } result[*found].redBits = getFBConfigAttrib(window, fbconfigs[i], GLX_RED_SIZE);