Skip to content
Snippets Groups Projects
Commit 82bd22ec authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Fix source list for -Wdeclaration-after-statement

The context creation files were not included on platforms other than
Win32.

(cherry picked from commit 9486ec0c)
parent bcd232e2
No related branches found
No related tags found
No related merge requests found
...@@ -83,12 +83,11 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR ...@@ -83,12 +83,11 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR
"${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
"${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
if (WIN32) set_source_files_properties(context.c init.c input.c monitor.c vulkan.c
set(windows_SOURCES ${glfw_SOURCES}) window.c win32_init.c win32_joystick.c
else() win32_monitor.c win32_time.c win32_thread.c
set(windows_SOURCES ${common_SOURCES}) win32_window.c wgl_context.c egl_context.c
endif() osmesa_context.c PROPERTIES
set_source_files_properties(${windows_SOURCES} PROPERTIES
COMPILE_FLAGS -Wdeclaration-after-statement) COMPILE_FLAGS -Wdeclaration-after-statement)
endif() endif()
......
...@@ -123,6 +123,7 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, ...@@ -123,6 +123,7 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
continue; continue;
#if defined(_GLFW_X11) #if defined(_GLFW_X11)
{
XVisualInfo vi = {0}; XVisualInfo vi = {0};
// Only consider EGLConfigs with associated Visuals // Only consider EGLConfigs with associated Visuals
...@@ -133,15 +134,15 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig, ...@@ -133,15 +134,15 @@ static GLFWbool chooseEGLConfig(const _GLFWctxconfig* ctxconfig,
if (desired->transparent) if (desired->transparent)
{ {
int count; int count;
XVisualInfo* vis = XGetVisualInfo(_glfw.x11.display, XVisualInfo* vis =
VisualIDMask, &vi, XGetVisualInfo(_glfw.x11.display, VisualIDMask, &vi, &count);
&count);
if (vis) if (vis)
{ {
u->transparent = _glfwIsVisualTransparentX11(vis[0].visual); u->transparent = _glfwIsVisualTransparentX11(vis[0].visual);
XFree(vis); XFree(vis);
} }
} }
}
#endif // _GLFW_X11 #endif // _GLFW_X11
if (ctxconfig->client == GLFW_OPENGL_ES_API) if (ctxconfig->client == GLFW_OPENGL_ES_API)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment