mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-09 15:08:13 +02:00
X11: Clarify code flow for Clang static analysis
From upstream: ef5220d6b1.
This commit is contained in:
5
glfw/x11_window.c
vendored
5
glfw/x11_window.c
vendored
@@ -1825,7 +1825,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* fbconfig)
|
||||
{
|
||||
Visual* visual;
|
||||
Visual* visual = NULL;
|
||||
int depth;
|
||||
|
||||
if (ctxconfig->client != GLFW_NO_API)
|
||||
@@ -1851,8 +1851,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
}
|
||||
}
|
||||
|
||||
if (ctxconfig->client == GLFW_NO_API ||
|
||||
ctxconfig->source == GLFW_OSMESA_CONTEXT_API)
|
||||
if (!visual)
|
||||
{
|
||||
visual = DefaultVisual(_glfw.x11.display, _glfw.x11.screen);
|
||||
depth = DefaultDepth(_glfw.x11.display, _glfw.x11.screen);
|
||||
|
||||
Reference in New Issue
Block a user