1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Backends: GLFW: fixed last ImGui_ImplGlfw_Shutdown() call not immediately clearing the context map. (#9075, #8676, #8239, #8069)

Amend/fix f633a6058
This commit is contained in:
ocornut 2025-11-17 13:37:20 +01:00
parent f145b0cffd
commit 9e15ebb402
2 changed files with 3 additions and 1 deletions

View file

@ -166,7 +166,7 @@
struct ImGui_ImplGlfw_WindowToContext { GLFWwindow* Window; ImGuiContext* Context; };
static ImVector<ImGui_ImplGlfw_WindowToContext> g_ContextMap;
static void ImGui_ImplGlfw_ContextMap_Add(GLFWwindow* window, ImGuiContext* ctx) { g_ContextMap.push_back(ImGui_ImplGlfw_WindowToContext{ window, ctx }); }
static void ImGui_ImplGlfw_ContextMap_Remove(GLFWwindow* window) { for (ImGui_ImplGlfw_WindowToContext& entry : g_ContextMap) if (entry.Window == window) { g_ContextMap.erase_unsorted(&entry); return; } }
static void ImGui_ImplGlfw_ContextMap_Remove(GLFWwindow* window) { for (ImGui_ImplGlfw_WindowToContext& entry : g_ContextMap) if (entry.Window == window) { g_ContextMap.erase_unsorted(&entry); if (g_ContextMap.empty()) g_ContextMap.clear(); return; } }
static ImGuiContext* ImGui_ImplGlfw_ContextMap_Get(GLFWwindow* window) { for (ImGui_ImplGlfw_WindowToContext& entry : g_ContextMap) if (entry.Window == window) return entry.Context; return nullptr; }
enum GlfwClientApi

View file

@ -125,6 +125,8 @@ Other Changes:
are not available. (#9024, #8969, #8921, #8920) [@jagot]
- GLFW: lower minimum requirement from GLFW 3.1 to GLFW 3.0. Though
a recent version e.g GLFW 3.4 is highly recommended! (#9055) [@Clownacy]
- GLFW: fixed last `ImGui_ImplGlfw_Shutdown()` not immediately clearing the context
map, which would be detected by leak trackers. (#9075, #8676, #8239, #8069) [@erincatto]
- SDL3: fixed Platform_OpenInShellFn() return value (the return value
was unused in core but might be used by a direct caller). (#9027) [@achabense]
- SDL3: fixed an issue with missing characters events when an already active text