Merge branch 'master' into docking

# Conflicts:
#	backends/imgui_impl_sdl2.cpp
#	backends/imgui_impl_sdl3.cpp
#	imgui.h
#	imgui_demo.cpp
#	imgui_internal.h
This commit is contained in:
ocornut
2026-02-17 17:49:40 +01:00
19 changed files with 279 additions and 167 deletions

View File

@@ -1,4 +1,4 @@
// dear imgui, v1.92.6 WIP
// dear imgui, v1.92.6
// (main code and documentation)
// Help:
@@ -421,13 +421,14 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
- BeginPopupContextItem("foo", 1); // Behavior unchanged (as a courtesy we legacy interpret 1 as ImGuiPopupFlags_MouseButtonRight, will assert if disabling legacy behaviors.
- BeginPopupContextItem("foo", 0); // !! Behavior changed !! Was Left button. Now will defaults to Right button! --> Use ImGuiPopupFlags_MouseButtonLeft.
- BeginPopupContextItem("foo", ImGuiPopupFlags_NoReopen); // !! Behavior changed !! Was Left button + flags. Now will defaults to Right button! --> Use ImGuiPopupFlags_MouseButtonLeft | xxx.
- 2025/12/23 (1.92.6) - Fonts:AddFontDefault() now automatically selects an embedded font between the new scalable AddFontDefaultVector() and the classic pixel-clean AddFontDefaultBitmap().
The default selection is based on (style.FontSizeBase * FontScaleMain * FontScaleDpi) reaching a small threshold. Prefer calling either based on your own logic. You can call AddFontDefaultBitmap() to ensure legacy behavior.
- 2025/12/23 (1.92.6) - Fonts: AddFontDefault() now automatically selects an embedded font between the new scalable AddFontDefaultVector() and the classic pixel-clean AddFontDefaultBitmap().
The default selection is based on (style.FontSizeBase * FontScaleMain * FontScaleDpi) reaching a small threshold, but old codebases may not set any of them properly. As as a result, it is likely that old codebase may still default to AddFontDefaultBitmap().
Prefer calling either based on your own logic. You can call AddFontDefaultBitmap() to ensure legacy behavior.
- 2025/12/23 (1.92.6) - Fonts: removed ImFontConfig::PixelSnapV added in 1.92 which turns out is unnecessary (and misdocumented). Post-rescale GlyphOffset is always rounded.
- 2025/12/17 (1.92.6) - Renamed helper macro IM_ARRAYSIZE() -> IM_COUNTOF(). Kept redirection/legacy name for now.
- 2025/12/11 (1.92.6) - Hashing: handling of "###" operator to reset to seed within a string identifier doesn't include the "###" characters in the output hash anymore.
- Before: GetID("Hello###World") == GetID("###World") != GetID("World");
- Now: GetID("Hello###World") == GetID("###World") == GetID("World");
- Before: GetID("Hello###World") == GetID("###World") != GetID("World")
- After: GetID("Hello###World") == GetID("###World") == GetID("World")
- This has the property of facilitating concatenating and manipulating identifiers using "###", and will allow fixing other dangling issues.
- This will invalidate hashes (stored in .ini data) for Tables and Windows that are using the "###" operators. (#713, #1698)
- 2025/11/24 (1.92.6) - Fonts: Fixed handling of `ImFontConfig::FontDataOwnedByAtlas = false` which did erroneously make a copy of the font data, essentially defeating the purpose of this flag and wasting memory.
@@ -1600,7 +1601,7 @@ void ImGuiStyle::ScaleAllSizes(float scale_factor)
ImGuiIO::ImGuiIO()
{
// Most fields are initialized with zero
memset(this, 0, sizeof(*this));
memset((void*)this, 0, sizeof(*this));
IM_STATIC_ASSERT(IM_COUNTOF(ImGuiIO::MouseDown) == ImGuiMouseButton_COUNT && IM_COUNTOF(ImGuiIO::MouseClicked) == ImGuiMouseButton_COUNT);
// Settings
@@ -2041,7 +2042,7 @@ void ImGuiIO::AddFocusEvent(bool focused)
ImGuiPlatformIO::ImGuiPlatformIO()
{
// Most fields are initialized with zero
memset(this, 0, sizeof(*this));
memset((void*)this, 0, sizeof(*this));
Platform_LocaleDecimalPoint = '.';
}
@@ -3298,7 +3299,7 @@ static void ImGuiListClipper_SeekCursorAndSetupPrevLine(ImGuiListClipper* clippe
ImGuiListClipper::ImGuiListClipper()
{
memset(this, 0, sizeof(*this));
memset((void*)this, 0, sizeof(*this));
}
ImGuiListClipper::~ImGuiListClipper()
@@ -4629,7 +4630,7 @@ void ImGui::CallContextHooks(ImGuiContext* ctx, ImGuiContextHookType hook_type)
// ImGuiWindow is mostly a dumb struct. It merely has a constructor and a few helper methods
ImGuiWindow::ImGuiWindow(ImGuiContext* ctx, const char* name) : DrawListInst(NULL)
{
memset(this, 0, sizeof(*this));
memset((void*)this, 0, sizeof(*this));
Ctx = ctx;
Name = ImStrdup(name);
NameBufLen = (int)ImStrlen(name) + 1;