mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-06 19:38:28 +00:00
Backends: GLFW: passing null window to glfwGetClipboardString()/glfwSetClipboardString().
This commit is contained in:
@@ -176,14 +176,14 @@ static ImGui_ImplGlfw_Data* ImGui_ImplGlfw_GetBackendData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
static const char* ImGui_ImplGlfw_GetClipboardText(void* user_data)
|
static const char* ImGui_ImplGlfw_GetClipboardText(void*)
|
||||||
{
|
{
|
||||||
return glfwGetClipboardString((GLFWwindow*)user_data);
|
return glfwGetClipboardString(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ImGui_ImplGlfw_SetClipboardText(void* user_data, const char* text)
|
static void ImGui_ImplGlfw_SetClipboardText(void*, const char* text)
|
||||||
{
|
{
|
||||||
glfwSetClipboardString((GLFWwindow*)user_data, text);
|
glfwSetClipboardString(NULL, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key)
|
static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key)
|
||||||
@@ -588,7 +588,6 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
|
|||||||
|
|
||||||
io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText;
|
io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText;
|
||||||
io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText;
|
io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText;
|
||||||
io.ClipboardUserData = bd->Window;
|
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
io.PlatformOpenInShellFn = [](ImGuiContext*, const char* url) { ImGui_ImplGlfw_EmscriptenOpenURL(url); return true; };
|
io.PlatformOpenInShellFn = [](ImGuiContext*, const char* url) { ImGui_ImplGlfw_EmscriptenOpenURL(url); return true; };
|
||||||
#endif
|
#endif
|
||||||
|
@@ -62,6 +62,8 @@ Other changes:
|
|||||||
provide a way to do a portable sleep. (#7844)
|
provide a way to do a portable sleep. (#7844)
|
||||||
- Backends: SDL2, SDL3: ignore events of other SDL windows. (#7853) [@madebr, @ocornut]
|
- Backends: SDL2, SDL3: ignore events of other SDL windows. (#7853) [@madebr, @ocornut]
|
||||||
- Backends: SDL2, SDL3: storing SDL_WindowID inside ImGuiViewport::PlatformHandle instead of SDL_Window*.
|
- Backends: SDL2, SDL3: storing SDL_WindowID inside ImGuiViewport::PlatformHandle instead of SDL_Window*.
|
||||||
|
- Backends: GLFW: passing null window to glfwGetClipboardString()/glfwSetClipboardString()
|
||||||
|
since GLFW own tests are doing that and it seems unnecessary.
|
||||||
- Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
|
- Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
|
||||||
to handle minimization without burning CPU or GPU by running unthrottled code. (#7844)
|
to handle minimization without burning CPU or GPU by running unthrottled code. (#7844)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user