Add curly braces

From upstream: 9486ec0c02.

The upstream commit mainly changes some cmake stuff, which we don't use and only really adds curly braces to `egl_context.c` (and changes some formatting).
This commit is contained in:
Luflosi 2019-12-11 22:23:54 +01:00
parent 5bc7cfaa43
commit ba201c4c92
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0

31
glfw/egl_context.c vendored
View File

@ -123,23 +123,24 @@ static bool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
continue; continue;
#if defined(_GLFW_X11) #if defined(_GLFW_X11)
XVisualInfo vi = {0};
// Only consider EGLConfigs with associated Visuals
vi.visualid = getEGLConfigAttrib(n, EGL_NATIVE_VISUAL_ID);
if (!vi.visualid)
continue;
if (desired->transparent)
{ {
int count; XVisualInfo vi = {0};
XVisualInfo* vis = XGetVisualInfo(_glfw.x11.display,
VisualIDMask, &vi, // Only consider EGLConfigs with associated Visuals
&count); vi.visualid = getEGLConfigAttrib(n, EGL_NATIVE_VISUAL_ID);
if (vis) if (!vi.visualid)
continue;
if (desired->transparent)
{ {
u->transparent = _glfwIsVisualTransparentX11(vis[0].visual); int count;
XFree(vis); XVisualInfo* vis =
XGetVisualInfo(_glfw.x11.display, VisualIDMask, &vi, &count);
if (vis)
{
u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);
XFree(vis);
}
} }
} }
#endif // _GLFW_X11 #endif // _GLFW_X11