mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-06 04:20:08 +00:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_dx10.cpp # backends/imgui_impl_dx11.cpp # backends/imgui_impl_dx12.cpp # backends/imgui_impl_sdl2.cpp # backends/imgui_impl_sdl3.cpp # examples/example_glfw_metal/main.mm # examples/example_glfw_opengl2/main.cpp # examples/example_glfw_opengl3/main.cpp # examples/example_glfw_vulkan/main.cpp # examples/example_sdl2_directx11/main.cpp # examples/example_sdl2_opengl2/main.cpp # examples/example_sdl2_opengl3/main.cpp # examples/example_sdl2_sdlrenderer2/main.cpp # examples/example_sdl2_vulkan/main.cpp # examples/example_sdl3_directx11/main.cpp # examples/example_sdl3_opengl3/main.cpp # examples/example_sdl3_sdlgpu3/main.cpp # examples/example_sdl3_sdlrenderer3/main.cpp # examples/example_sdl3_vulkan/main.cpp # examples/example_win32_directx10/main.cpp # examples/example_win32_directx11/main.cpp # examples/example_win32_directx12/main.cpp # examples/example_win32_directx9/main.cpp # examples/example_win32_opengl3/main.cpp # examples/example_win32_vulkan/main.cpp # imgui_internal.h
This commit is contained in:
commit
2a08c87b8c
66 changed files with 308 additions and 310 deletions
|
|
@ -25,7 +25,8 @@
|
|||
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
||||
// 2026-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
||||
// 2026-01-15: Changed GetClipboardText() handler to return nullptr on error aka clipboard contents is not text. Consistent with other backends. (#9168)
|
||||
// 2025-09-24: Skip using the SDL_GetGlobalMouseState() state when one of our window is hovered, as the SDL_MOUSEMOTION data is reliable. Fix macOS notch mouse coordinates issue in fullscreen mode + better perf on X11. (#7919, #7786)
|
||||
// 2025-09-18: Call platform_io.ClearPlatformHandlers() on shutdown.
|
||||
// 2025-09-15: Content Scales are always reported as 1.0 on Wayland. (#8921)
|
||||
|
|
@ -203,7 +204,10 @@ static const char* ImGui_ImplSDL2_GetClipboardText(ImGuiContext*)
|
|||
ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData();
|
||||
if (bd->ClipboardTextData)
|
||||
SDL_free(bd->ClipboardTextData);
|
||||
bd->ClipboardTextData = SDL_GetClipboardText();
|
||||
if (SDL_HasClipboardText())
|
||||
bd->ClipboardTextData = SDL_GetClipboardText();
|
||||
else
|
||||
bd->ClipboardTextData = nullptr;
|
||||
return bd->ClipboardTextData;
|
||||
}
|
||||
|
||||
|
|
@ -763,7 +767,7 @@ static void ImGui_ImplSDL2_UpdateMouseData()
|
|||
// Note that SDL_GetGlobalMouseState() is in theory slow on X11, but this only runs on rather specific cases. If a problem we may provide a way to opt-out this feature.
|
||||
SDL_Window* hovered_window = SDL_GetMouseFocus();
|
||||
const bool is_relative_mouse_mode = SDL_GetRelativeMouseMode() != 0;
|
||||
if (hovered_window == NULL && bd->MouseCanUseGlobalState && bd->MouseButtonsDown == 0 && !is_relative_mouse_mode)
|
||||
if (hovered_window == nullptr && bd->MouseCanUseGlobalState && bd->MouseButtonsDown == 0 && !is_relative_mouse_mode)
|
||||
{
|
||||
// Single-viewport mode: mouse position in client window coordinates (io.MousePos is (0,0) when the mouse is on the upper-left corner of the app window)
|
||||
// Multi-viewport mode: mouse position in OS absolute coordinates (io.MousePos is (0,0) when the mouse is on the upper-left of the primary monitor)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue