Native window support for XCB (X11 without macro pollution)
Author: pknowlesCreated Sep 25, 2026Updated Sep 25, 2026
X11 and Wayland are already supported by GLFW/glfw3native.h. XCB is missing and only needs a few calls. A direct use-case is code that needs to own Vulkan surface creation (e.g. here).
The X11 path is insufficient because https://stackoverflow.com/questions/79583727/how-to-avoid-macros-from-x11-polluting-other-third-party-code
Adding the following methods would complete the window system symmetry (as described here):
xcb_visualid_t glfwGetXCBVisualID();
xcb_connection_t* glfwGetXCBConnection();
xcb_window_t glfwGetXCBWindow(GLFWwindow* window);This is effectively a dupe of https://github.com/glfw/glfw/issues/1061
Source: glfw/glfw