-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Description
Version/Branch of Dear ImGui:
Version 1.92.3+, Branch: docking
Back-ends:
imgui_impl_glfw.cpp
Compiler, OS:
Linux + Any compiler
Full config/build information:
No response
Details:
Since commit 6b2cdf2 the GLFW backend uses X11 functions directly (e.g. XFlush in ImGui_ImplGlfw_SetWindowFloating). This is a breaking change for some builds because this means that executables and dynamic libraries now need this symbol at link or load time respectively.
GLFW internally loads these function at initialization time with dlopen and calls them through function pointers. This is also potentially bad because the versions of these functions used by GLFW are potentially not the same as those linked at build time or loaded at load time (though I don't really know in which realistic scenario this could actually happen).
The best solution in my opinion would be to use the function pointers loaded by GLFW or expose this functionality in GLFW directly, but there does not seem to be a straight forward way to do this without changes to GLFW (as far as I know).
A workaround would be to put these behind a build flag / define to allow existing code that cannot link with X11 at build or load time to keep working.