From 68894d414977b6b970858dd9ac17e32eb4e443ac Mon Sep 17 00:00:00 2001 From: achabense <60953653+achabense@users.noreply.github.com> Date: Wed, 19 Nov 2025 22:45:20 +0800 Subject: [PATCH 01/11] Docs: fixed outdated comment. (#9082) --- imgui.h | 2 +- imgui_demo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui.h b/imgui.h index d0bf6fa7b..68e7f2616 100644 --- a/imgui.h +++ b/imgui.h @@ -1452,7 +1452,7 @@ enum ImGuiHoveredFlags_ // Tooltips mode // - typically used in IsItemHovered() + SetTooltip() sequence. // - this is a shortcut to pull flags from 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' where you can reconfigure desired behavior. - // e.g. 'TooltipHoveredFlagsForMouse' defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + // e.g. 'HoverFlagsForTooltipMouse' defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_AllowWhenDisabled'. // - for frequently actioned or hovered items providing a tooltip, you want may to use ImGuiHoveredFlags_ForTooltip (stationary + delay) so the tooltip doesn't show too often. // - for items which main purpose is to be hovered, or items with low affordance, or in less consistent apps, prefer no delay or shorter delay. ImGuiHoveredFlags_ForTooltip = 1 << 12, // Shortcut for standard flags when using IsItemHovered() + SetTooltip() sequence. diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 1c8779951..6a16f7ff3 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -5323,7 +5323,7 @@ static void DemoWindowPopups() if (ImGui::BeginPopupContextItem()) // <-- use last item id as popup id { selected = n; - ImGui::Text("This a popup for \"%s\"!", names[n]); + ImGui::Text("This is a popup for \"%s\"!", names[n]); if (ImGui::Button("Close")) ImGui::CloseCurrentPopup(); ImGui::EndPopup(); From b4a3d423e07c7e3bea796e3b5c35c61cd74be9e5 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 19 Nov 2025 17:06:44 +0100 Subject: [PATCH 02/11] Docs: amend BeginDisabled() comments. (#9082) --- imgui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.h b/imgui.h index 68e7f2616..2279e6300 100644 --- a/imgui.h +++ b/imgui.h @@ -976,7 +976,7 @@ namespace ImGui // Disabling [BETA API] // - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors) // - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled) - // - Tooltips windows by exception are opted out of disabling. + // - Tooltips windows are automatically opted out of disabling. Note that IsItemHovered() by default returns false on disabled items, unless using ImGuiHoveredFlags_AllowWhenDisabled. // - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls) IMGUI_API void BeginDisabled(bool disabled = true); IMGUI_API void EndDisabled(); From 1f16ca5e5cca7dd7e2fa793099664fbf8824cb02 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 19 Nov 2025 17:12:49 +0100 Subject: [PATCH 03/11] Docs: update ShowUserGuide() + PR guidelines. (#9071) --- .github/pull_request_template.md | 6 ++++-- imgui_demo.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 796ec0b9e..d40b14ccf 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,9 @@ 1. PLEASE CAREFULLY READ: [Contributing Guidelines](https://github.com/ocornut/imgui/blob/master/docs/CONTRIBUTING.md) -2. Make sure you're using a special branch just for this pull request. (Sometimes people unknowingly use a default branch, then later update that branch, which updates the pull request with the other changes if it hasn't been merged yet.) +2. **Make sure you're using a special branch just for this pull request**. (In git, 1 PR = 1 branch. If you update the branch the PR will be updated.) -3. Clear this template before submitting your PR. +3. Consider running the [imgui_test_suite](https://github.com/ocornut/imgui_test_engine) or adding new tests to test for expected behaviors. + +4. Clear this template before submitting your PR. diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 6a16f7ff3..92857aa3f 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -8641,11 +8641,11 @@ void ImGui::ShowUserGuide() ImGuiIO& io = GetIO(); BulletText("Double-click on title bar to collapse window."); BulletText( - "Click and drag on lower corner to resize window\n" - "(double-click to auto fit window to its contents)."); + "Click and drag on lower corner or border to resize window.\n" + "(double-click to auto fit window to its contents)"); BulletText("Ctrl+Click on a slider or drag box to input value as text."); BulletText("Tab/Shift+Tab to cycle through keyboard editable fields."); - BulletText("Ctrl+Tab to select a window."); + BulletText("Ctrl+Tab/Ctrl+Shift+Tab to focus windows."); if (io.FontAllowUserScaling) BulletText("Ctrl+Mouse Wheel to zoom window contents."); BulletText("While inputting text:\n"); @@ -8658,10 +8658,10 @@ void ImGui::ShowUserGuide() Unindent(); BulletText("With keyboard navigation enabled:"); Indent(); - BulletText("Arrow keys to navigate."); + BulletText("Arrow keys or Home/End/PageUp/PageDown to navigate."); BulletText("Space to activate a widget."); BulletText("Return to input text into a widget."); - BulletText("Escape to deactivate a widget, close popup, exit child window."); + BulletText("Escape to deactivate a widget, close popup,\nexit a child window or the menu layer, clear focus."); BulletText("Alt to jump to the menu layer of a window."); Unindent(); } From db6b8e0fb34b93e0ddf9d669f6f56eeba78ce44a Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 19 Nov 2025 17:21:17 +0100 Subject: [PATCH 04/11] Drag and Drop: handling of Escape after UpdateKeyboardInputs(). (#9071) --- imgui.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index c20e8dfa3..fcf248aba 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5525,6 +5525,18 @@ void ImGui::NewFrame() g.HoverItemDelayTimer = g.HoverItemDelayClearTimer = 0.0f; // May want a decaying timer, in which case need to clamp at max first, based on max of caller last requested timer. } + // Close popups on focus lost (currently wip/opt-in) + //if (g.IO.AppFocusLost) + // ClosePopupsExceptModals(); + + // Update keyboard input state + UpdateKeyboardInputs(); + + //IM_ASSERT(g.IO.KeyCtrl == IsKeyDown(ImGuiKey_LeftCtrl) || IsKeyDown(ImGuiKey_RightCtrl)); + //IM_ASSERT(g.IO.KeyShift == IsKeyDown(ImGuiKey_LeftShift) || IsKeyDown(ImGuiKey_RightShift)); + //IM_ASSERT(g.IO.KeyAlt == IsKeyDown(ImGuiKey_LeftAlt) || IsKeyDown(ImGuiKey_RightAlt)); + //IM_ASSERT(g.IO.KeySuper == IsKeyDown(ImGuiKey_LeftSuper) || IsKeyDown(ImGuiKey_RightSuper)); + // Drag and drop g.DragDropAcceptIdPrev = g.DragDropAcceptIdCurr; g.DragDropAcceptIdCurr = 0; @@ -5541,18 +5553,6 @@ void ImGui::NewFrame() } g.TooltipPreviousWindow = NULL; - // Close popups on focus lost (currently wip/opt-in) - //if (g.IO.AppFocusLost) - // ClosePopupsExceptModals(); - - // Update keyboard input state - UpdateKeyboardInputs(); - - //IM_ASSERT(g.IO.KeyCtrl == IsKeyDown(ImGuiKey_LeftCtrl) || IsKeyDown(ImGuiKey_RightCtrl)); - //IM_ASSERT(g.IO.KeyShift == IsKeyDown(ImGuiKey_LeftShift) || IsKeyDown(ImGuiKey_RightShift)); - //IM_ASSERT(g.IO.KeyAlt == IsKeyDown(ImGuiKey_LeftAlt) || IsKeyDown(ImGuiKey_RightAlt)); - //IM_ASSERT(g.IO.KeySuper == IsKeyDown(ImGuiKey_LeftSuper) || IsKeyDown(ImGuiKey_RightSuper)); - // Update keyboard/gamepad navigation NavUpdate(); From 0faa0dba15d635ddcf0c98250eda72c064ff6f67 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 19 Nov 2025 18:26:31 +0100 Subject: [PATCH 05/11] Drag and Drop: rework cancel drag and drop logic to be overridable. (#9071) --- imgui.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index fcf248aba..9e84b75d0 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5546,10 +5546,18 @@ void ImGui::NewFrame() g.DragDropWithinSource = false; g.DragDropWithinTarget = false; g.DragDropHoldJustPressedId = 0; - if (g.DragDropActive && IsKeyPressed(ImGuiKey_Escape, ImGuiInputFlags_None, g.ActiveId)) // Also works when g.ActiveId==0 (aka leftover payload in progress, no active id) + if (g.DragDropActive) { - ClearActiveID(); - ClearDragDrop(); + // Also works when g.ActiveId==0 (aka leftover payload in progress, no active id) + // You may disable this externally by hijacking the input route: + // 'if (GetDragDropPayload() != NULL) { Shortcut(ImGuiKey_Escape, ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteOverActive); } + // but you will not get a return value from Shortcut() due to ActiveIdUsingAllKeyboardKeys logic. You can however poll IsKeyPressed(ImGuiKey_Escape) afterwards. + ImGuiID owner_id = g.ActiveId ? g.ActiveId : ImHashStr("##DragDropCancelHandler"); + if (Shortcut(ImGuiKey_Escape, ImGuiInputFlags_RouteGlobal, owner_id)) + { + ClearActiveID(); + ClearDragDrop(); + } } g.TooltipPreviousWindow = NULL; From 4ab86e1d61c58688e1c7df90e842687c7a49bfdf Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 19 Nov 2025 19:01:03 +0100 Subject: [PATCH 06/11] Nav: fixed scoring when using PageUp/PageDown from a focused item which is outside of visible boundaries. (#9079) We only use ImGuiNavMoveFlags_AlsoScoreVisibleSet when starting point is visible. --- imgui.cpp | 16 +++++++++++----- imgui.h | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 9e84b75d0..6704cb294 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -13891,11 +13891,17 @@ void ImGui::NavUpdateCreateMoveRequest() { ImRect nav_rect_rel = !window->NavRectRel[g.NavLayer].IsInverted() ? window->NavRectRel[g.NavLayer] : ImRect(0, 0, 0, 0); scoring_rect = WindowRectRelToAbs(window, nav_rect_rel); - if (scoring_page_offset_y != 0.0f) + + if (g.NavMoveFlags & ImGuiNavMoveFlags_IsPageMove) + { + // When we start from a visible location, score visible items and prioritize this result. + if (window->InnerRect.Contains(scoring_rect)) + g.NavMoveFlags |= ImGuiNavMoveFlags_AlsoScoreVisibleSet; g.NavScoringNoClipRect = scoring_rect; - scoring_rect.TranslateY(scoring_page_offset_y); - if (scoring_page_offset_y != 0.0f) + scoring_rect.TranslateY(scoring_page_offset_y); g.NavScoringNoClipRect.Add(scoring_rect); + } + //GetForegroundDrawList()->AddRectFilled(scoring_rect.Min - ImVec2(1, 1), scoring_rect.Max + ImVec2(1, 1), IM_COL32(255, 100, 0, 80)); // [DEBUG] Pre-bias if (g.NavMoveSubmitted) NavBiasScoringRect(scoring_rect, window->RootWindowForNav->NavPreferredScoringPosRel[g.NavLayer], g.NavMoveDir, g.NavMoveFlags); @@ -14147,14 +14153,14 @@ static float ImGui::NavUpdatePageUpPageDown() nav_scoring_rect_offset_y = -page_offset_y; g.NavMoveDir = ImGuiDir_Down; // Because our scoring rect is offset up, we request the down direction (so we can always land on the last item) g.NavMoveClipDir = ImGuiDir_Up; - g.NavMoveFlags = ImGuiNavMoveFlags_AllowCurrentNavId | ImGuiNavMoveFlags_AlsoScoreVisibleSet | ImGuiNavMoveFlags_IsPageMove; + g.NavMoveFlags = ImGuiNavMoveFlags_AllowCurrentNavId | ImGuiNavMoveFlags_IsPageMove; // ImGuiNavMoveFlags_AlsoScoreVisibleSet may be added later } else if (IsKeyPressed(ImGuiKey_PageDown, true)) { nav_scoring_rect_offset_y = +page_offset_y; g.NavMoveDir = ImGuiDir_Up; // Because our scoring rect is offset down, we request the up direction (so we can always land on the last item) g.NavMoveClipDir = ImGuiDir_Down; - g.NavMoveFlags = ImGuiNavMoveFlags_AllowCurrentNavId | ImGuiNavMoveFlags_AlsoScoreVisibleSet | ImGuiNavMoveFlags_IsPageMove; + g.NavMoveFlags = ImGuiNavMoveFlags_AllowCurrentNavId | ImGuiNavMoveFlags_IsPageMove; // ImGuiNavMoveFlags_AlsoScoreVisibleSet may be added later } else if (home_pressed) { diff --git a/imgui.h b/imgui.h index 2279e6300..c775df0be 100644 --- a/imgui.h +++ b/imgui.h @@ -29,7 +29,7 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') #define IMGUI_VERSION "1.92.5 WIP" -#define IMGUI_VERSION_NUM 19247 +#define IMGUI_VERSION_NUM 19248 #define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000 #define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198 From e8448d04947f5d06983b82ee6c3185a1f0f13148 Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Thu, 20 Nov 2025 11:33:28 +0200 Subject: [PATCH 07/11] CI: general update + rename steps. --- .github/workflows/build.yml | 54 ++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c9e8dcdb..68b4b3d14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,13 +16,21 @@ on: - requested jobs: - Windows: + Build-Windows: runs-on: windows-2025 + name: Build - Windows + + defaults: + run: + working-directory: ${{ github.workspace }}/imgui + env: VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\ MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\ steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 + with: + path: ${{ github.workspace }}/imgui # The VulkanSDK libs for Windows is manually generated using build_windows_vulkan_libs.ps1 + attached to issue #8925. # (we have a .yml workflow in commit history if it becomes ever useful to create this on CI too) @@ -257,10 +265,18 @@ jobs: shell: cmd run: '"%MSBUILD_PATH%\MSBuild.exe" examples/example_win32_directx12/example_win32_directx12.vcxproj /p:Platform=x64 /p:Configuration=Release' - Linux: + Build-Linux: runs-on: ubuntu-latest + name: Build - Linux + + defaults: + run: + working-directory: ${{ github.workspace }}/imgui + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 + with: + path: ${{ github.workspace }}/imgui - name: Install Dependencies run: | @@ -474,10 +490,18 @@ jobs: - name: Build with IMGUI_IMPL_VULKAN_NO_PROTOTYPES run: g++ -c -I. -std=c++11 -DIMGUI_IMPL_VULKAN_NO_PROTOTYPES=1 backends/imgui_impl_vulkan.cpp - MacOS: + Build-MacOS: runs-on: macos-latest + name: Build - MacOS + + defaults: + run: + working-directory: ${{ github.workspace }}/imgui + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 + with: + path: ${{ github.workspace }}/imgui - name: Install Dependencies run: | @@ -548,20 +572,24 @@ jobs: - name: Build example_apple_opengl2 run: xcodebuild -project examples/example_apple_opengl2/example_apple_opengl2.xcodeproj -target example_osx_opengl2 - iOS: + Build-iOS: runs-on: macos-14 + name: Build - iOS + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Build example_apple_metal run: | # Code signing is required, but we disable it because it is irrelevant for CI builds. xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_ios CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO - Emscripten: + Build-Emscripten: runs-on: ubuntu-latest + name: Build - Emscripten + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install Dependencies run: | @@ -599,10 +627,12 @@ jobs: emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release examples/example_glfw_wgpu cmake --build build - Android: + Build-Android: runs-on: ubuntu-latest + name: Build - Android + steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Build example_android_opengl3 run: | From 8ff7f35eec319ff48151a3f6603719d42f21a6ff Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Thu, 20 Nov 2025 14:35:32 +0100 Subject: [PATCH 08/11] CI: run imgui_test_suite as part of CI build. --- .github/workflows/build.yml | 134 ++++++++++++++++++++++++++++++++++++ docs/CHANGELOG.txt | 1 + 2 files changed, 135 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68b4b3d14..3ee729717 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -638,3 +638,137 @@ jobs: run: | cd examples/example_android_opengl3/android gradle assembleDebug --stacktrace + + Test-Windows: + runs-on: windows-2025 + name: Test - Windows + + defaults: + run: + working-directory: ${{ github.workspace }}/imgui + + env: + MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\ + + steps: + - uses: actions/checkout@v5 + with: + path: ${{ github.workspace }}/imgui + + - uses: actions/checkout@v5 + continue-on-error: true + with: + fetch-depth: 1 + repository: ocornut/imgui_test_engine + path: ${{ github.workspace }}/imgui_test_engine + submodules: true + + - name: Fix Tests Projects + shell: powershell + working-directory: ${{ github.workspace }}/imgui_test_engine + run: | + # WARNING: This will need updating if toolset/sdk change in project files! + gci -recurse -filter "*.vcxproj" | ForEach-Object { + # Fix SDK and toolset for most samples. + (Get-Content $_.FullName) -Replace "v110","v142" | Set-Content -Path $_.FullName + (Get-Content $_.FullName) -Replace "8.1","10.0.20348.0" | Set-Content -Path $_.FullName + # Fix SDK and toolset for samples that require newer SDK/toolset. At the moment it is only dx12. + (Get-Content $_.FullName) -Replace "v140","v142" | Set-Content -Path $_.FullName + (Get-Content $_.FullName) -Replace "10.0.14393.0","10.0.20348.0" | Set-Content -Path $_.FullName + } + + - name: Build Tests + shell: cmd + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: '"%MSBUILD_PATH%\MSBuild.exe" imgui_test_suite.vcxproj /p:Platform=x64 /p:Configuration=Release /p:ClFlags=/WX -maxcpucount:%NUMBER_OF_PROCESSORS%' + + - name: Run Tests + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 tests + + - name: Check for Docking + id: check_docking + shell: bash + working-directory: ${{ github.workspace }}/imgui + run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT + + - name: Run Viewport Tests + if: steps.check_docking.outputs.has_dock == 'true' + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: Release/imgui_test_suite.exe -nogui -nopause -v2 -ve4 -viewport-mock viewport + + Test-Linux: + runs-on: ubuntu-latest + name: Test - Linux + + defaults: + run: + working-directory: ${{ github.workspace }}/imgui + + steps: + - uses: actions/checkout@v5 + with: + path: ${{ github.workspace }}/imgui + + - uses: actions/checkout@v5 + with: + fetch-depth: 1 + repository: ocornut/imgui_test_engine + path: ${{ github.workspace }}/imgui_test_engine + submodules: true + + - name: Build Tests + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: make -j$(nproc) + + - name: Run Tests + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests + + - name: Check for Docking + id: check_docking + working-directory: ${{ github.workspace }}/imgui + run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT + + - name: Run Viewport Tests + if: steps.check_docking.outputs.has_dock == 'true' + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport + + Test-MacOS: + runs-on: macos-latest + name: Test - MacOS + + defaults: + run: + working-directory: ${{ github.workspace }}/imgui + + steps: + - uses: actions/checkout@v5 + with: + path: ${{ github.workspace }}/imgui + + - uses: actions/checkout@v5 + with: + fetch-depth: 1 + repository: ocornut/imgui_test_engine + path: ${{ github.workspace }}/imgui_test_engine + submodules: true + + - name: Build Tests + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: make -j$(nproc) + + - name: Run Tests + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 tests + + - name: Check for Docking + id: check_docking + working-directory: ${{ github.workspace }}/imgui + run: echo "has_dock=$(grep -q "#define IMGUI_HAS_DOCK" imgui.h && echo true || echo false)" >> $GITHUB_OUTPUT + + - name: Run Viewport Tests + if: steps.check_docking.outputs.has_dock == 'true' + working-directory: ${{ github.workspace }}/imgui_test_engine/imgui_test_suite + run: ./imgui_test_suite -nogui -nopause -v2 -ve4 -viewport-mock viewport diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 116e3760d..f598e3f03 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -119,6 +119,7 @@ Other Changes: Note that IsItemDeactivatedAfterEdit() was not affected, only IsItemEdited). - Misc: standardized casing of keyboard mods in comments and demo, showing as e.g. "Ctrl" instead of "CTRL". +- CI: Added Dear ImGui Test Suite to CI builds. [@rokups] - Drag and Drop: - Added ImGuiDragDropFlags_AcceptDrawAsHovered to make accepting item render as hovered, which can allow using e.g. Button() as drop target. (#8632) From a484fd2b56f9d208f304d4e1ec0b57cd51502b48 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 20 Nov 2025 14:50:08 +0100 Subject: [PATCH 09/11] Examples: Win32+OpenGL3: enable DPI awareness. (#9083) --- docs/CHANGELOG.txt | 1 + examples/example_win32_opengl3/main.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index f598e3f03..e17e64e2a 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -175,6 +175,7 @@ Other Changes: during surface resize. (#8381) - SDL2+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt] - SDL3+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt] + - Win32+OpenGL3: enable DPI awareness. (#9083) ----------------------------------------------------------------------- diff --git a/examples/example_win32_opengl3/main.cpp b/examples/example_win32_opengl3/main.cpp index 9ad74d61f..8d29c41ca 100644 --- a/examples/example_win32_opengl3/main.cpp +++ b/examples/example_win32_opengl3/main.cpp @@ -37,7 +37,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); int main(int, char**) { // Make process DPI aware and obtain main monitor scale - //ImGui_ImplWin32_EnableDpiAwareness(); // FIXME: This somehow doesn't work in the Win32+OpenGL example. Why? + ImGui_ImplWin32_EnableDpiAwareness(); float main_scale = ImGui_ImplWin32_GetDpiScaleForMonitor(::MonitorFromPoint(POINT{ 0, 0 }, MONITOR_DEFAULTTOPRIMARY)); // Create application window From 26ff93dadc85c54fc6a467239fe91726540fef2a Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 20 Nov 2025 14:51:25 +0100 Subject: [PATCH 10/11] Examples: NULL: fixed msvc project. --- examples/example_null/example_null.vcxproj | 8 +++++++- examples/example_null/example_null.vcxproj.filters | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/example_null/example_null.vcxproj b/examples/example_null/example_null.vcxproj index c8836c7e4..8ef991f3f 100644 --- a/examples/example_null/example_null.vcxproj +++ b/examples/example_null/example_null.vcxproj @@ -148,17 +148,23 @@ + + + true + true + true + true + - diff --git a/examples/example_null/example_null.vcxproj.filters b/examples/example_null/example_null.vcxproj.filters index 9b485d5f4..6d575a8f5 100644 --- a/examples/example_null/example_null.vcxproj.filters +++ b/examples/example_null/example_null.vcxproj.filters @@ -18,6 +18,9 @@ imgui + + sources + From 6d910d5487d11ca567b61c7824b0c78c569d62f0 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 20 Nov 2025 17:25:43 +0100 Subject: [PATCH 11/11] Version 1.92.5 --- docs/CHANGELOG.txt | 36 +++++++++++++++++++----------------- imgui.cpp | 20 +++++++++++--------- imgui.h | 21 +++++++++++---------- imgui_demo.cpp | 2 +- imgui_draw.cpp | 2 +- imgui_internal.h | 2 +- imgui_tables.cpp | 2 +- imgui_widgets.cpp | 2 +- 8 files changed, 46 insertions(+), 41 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index e17e64e2a..a9c0fea2f 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -36,9 +36,11 @@ HOW TO UPDATE? - Please report any issue! ----------------------------------------------------------------------- - VERSION 1.92.5 WIP (In Progress) + VERSION 1.92.5 (Released 2025-11-20) ----------------------------------------------------------------------- +Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.5 + Breaking Changes: - Keys: commented out legacy names which were obsoleted in 1.89.0 (August 2022). @@ -61,13 +63,6 @@ Breaking Changes: Other Changes: -- Tables: fixed a bug where nesting BeginTable()->Begin()->BeginTable() would - result in temporarily incorrect state, which would lead to bugs to side effects - in various locations, e.g. GetContentRegionAvail() calls or using clipper. (#9005) - EndTable() was mistakenly restoring a wrong current table. -- Tables: Angled headers: fixed an auto-resize feedback loop that could - affect tables with empty non-resizing columns using angled headers, making - them typically flicker back and forth between +0 and +1 pixels. - Windows: - Config flag io.ConfigWindowsMoveFromTitleBarOnly is now latched during Begin(), effectively allowing to change the value on a per-window basis. @@ -77,6 +72,14 @@ Other Changes: scrollbar on the other axis. (#9060) - Fixed an issue where repeated calls to SetNextWindowSize() using 0.0f to auto-size on a given axis would keep marking ini settings as dirty. +- Tables: + - Fixed a bug where nesting BeginTable()->Begin()->BeginTable() would + result in temporarily incorrect state, which would lead to bugs to side effects + in various locations, e.g. GetContentRegionAvail() calls or using clipper. (#9005) + EndTable() was mistakenly restoring a wrong current table. + - Angled headers: fixed an auto-resize feedback loop that could + affect tables with empty non-resizing columns using angled headers, making + them typically flicker back and forth between +0 and +1 pixels. - Disabled: fixed a bug when a previously enabled item that got nav focus and then turns disabled could still be activated using keyboard. (#9036) - InputText: @@ -95,7 +98,7 @@ Other Changes: most typically achieved when resizing programmatically or via a docking layout reacting to a platform window resize). (#3237, #9007) [@anton-kl, @ocornut] - Nav: - - Reworked PageUp/PageDown to pick same-page top/bottom page based + - Reworked PageUp/PageDown logic to pick same-page top/bottom page based on inner rectangle rather than clipping rectangle, ensuring consistent (but occasionally less practical) navigation result when a window is partially out of screen. (#787) @@ -116,7 +119,7 @@ Other Changes: - Groups: fixed an issue reporting IsItemEdited() signal after EndGroup() when triggered by some widgets e.g. Checkbox(), Selectable() and many others, which cleared ActiveId at the same time as editing. (#9028) - Note that IsItemDeactivatedAfterEdit() was not affected, only IsItemEdited). + Note that IsItemDeactivatedAfterEdit() was not affected, only IsItemEdited(). - Misc: standardized casing of keyboard mods in comments and demo, showing as e.g. "Ctrl" instead of "CTRL". - CI: Added Dear ImGui Test Suite to CI builds. [@rokups] @@ -137,7 +140,7 @@ Other Changes: - Metrics: fixed table and columns rect highlight from display when debug/metrics window is not in the same viewport as the table. - Backends: - - Null: added imgui_impl_null platform/renderer backend. + - NULL: added imgui_impl_null platform/renderer backend. This is designed if you need to run e.g. context with no input or no ouput. - GLFW: fixed building on Linux platforms where Wayland headers are not available. (#9024, #8969, #8921, #8920) [@jagot] @@ -151,6 +154,10 @@ Other Changes: field changes viewports. (#9054) - Vulkan: added IMGUI_IMPL_VULKAN_VOLK_FILENAME to configure path to Volk (default to "volk.h"). (#9008, #7722, #6582, #4854) [@mwlasiuk] + - WebGPU: update to compile with Dawn and Emscripten's 4.0.10+ + '--use-port=emdawnwebgpu' ports. (#8381, #8898, #7435) [@brutpitt, @trbabb] + When using Emscripten 4.0.10+, backend now defaults to IMGUI_IMPL_WEBGPU_BACKEND_DAWN + instead of IMGUI_IMPL_WEBGPU_BACKEND_WGPU, if neither are specified. - WebGPU: added various internal/optional helpers to wrap some of the Dawn/WGPU/Emscripten debacle quirks: (#8381) [@brutpitt] - ImGui_ImplWGPU_CreateWGPUSurfaceHelper(). @@ -159,15 +166,10 @@ Other Changes: - ImGui_ImplWGPU_GetBackendTypeName(), ImGui_ImplWGPU_GetAdapterTypeName(), ImGui_ImplWGPU_GetDeviceLostReasonName(), ImGui_ImplWGPU_GetErrorTypeName(), ImGui_ImplWGPU_GetLogLevelName(). - - WebGPU: update to compile with Dawn and Emscripten's 4.0.10+ - '--use-port=emdawnwebgpu' ports. (#8381, #8898, #7435) [@brutpitt, @trbabb] - When using Emscripten 4.0.10+, backend now defaults to IMGUI_IMPL_WEBGPU_BACKEND_DAWN - instead of IMGUI_IMPL_WEBGPU_BACKEND_WGPU, if neither are specified. - (note: examples application were not updated yet) - Win32: Revert 1.92.4 change of comparing dwPacketNumber, which prevents refreshing accurate gamepad info after focus-out + io.ClearInputKeys(). (#8556) - Examples: - - Null: update examples_null to use imgui_impl_null (which is a bit overengineering + - NULL: update examples_null to use imgui_impl_null (which is a bit overengineering but somehow consistent). - GLFW+WebGPU: update example for latest specs, to work on Emscripten 4.0.10+, latest Dawn-Native and WGPU-Native. (#8381, #8567, #8191, #7435) [@brutpitt] diff --git a/imgui.cpp b/imgui.cpp index 6704cb294..2bb3ad3d9 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1,27 +1,28 @@ -// dear imgui, v1.92.5 WIP +// dear imgui, v1.92.5 // (main code and documentation) // Help: -// - See links below. // - Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp. All applications in examples/ are doing that. // - Read top of imgui.cpp for more details, links and comments. +// - Add '#define IMGUI_DEFINE_MATH_OPERATORS' before including imgui.h (or in imconfig.h) to access courtesy maths operators for ImVec2 and ImVec4. // Resources: // - FAQ ........................ https://dearimgui.com/faq (in repository as docs/FAQ.md) // - Homepage ................... https://github.com/ocornut/imgui -// - Releases & changelog ....... https://github.com/ocornut/imgui/releases +// - Releases & Changelog ....... https://github.com/ocornut/imgui/releases // - Gallery .................... https://github.com/ocornut/imgui/issues?q=label%3Agallery (please post your screenshots/video there!) // - Wiki ....................... https://github.com/ocornut/imgui/wiki (lots of good stuff there) // - Getting Started https://github.com/ocornut/imgui/wiki/Getting-Started (how to integrate in an existing app by adding ~25 lines of code) // - Third-party Extensions https://github.com/ocornut/imgui/wiki/Useful-Extensions (ImPlot & many more) -// - Bindings/Backends https://github.com/ocornut/imgui/wiki/Bindings (language bindings, backends for various tech/engines) -// - Glossary https://github.com/ocornut/imgui/wiki/Glossary +// - Bindings/Backends https://github.com/ocornut/imgui/wiki/Bindings (language bindings + backends for various tech/engines) // - Debug Tools https://github.com/ocornut/imgui/wiki/Debug-Tools +// - Glossary https://github.com/ocornut/imgui/wiki/Glossary // - Software using Dear ImGui https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui // - Issues & support ........... https://github.com/ocornut/imgui/issues // - Test Engine & Automation ... https://github.com/ocornut/imgui_test_engine (test suite, test engine to automate your apps) +// - Web version of the Demo .... https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html (w/ source code browser) -// For first-time users having issues compiling/linking/running: +// For FIRST-TIME users having issues compiling/linking/running: // please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above. // Everything else should be asked in 'Issues'! We are building a database of cross-linked knowledge there. // Since 1.92, we encourage font loading questions to also be posted in 'Issues'. @@ -122,7 +123,7 @@ CODE Designed primarily for developers and content-creators, not the typical end-user! Some of the current weaknesses (which we aim to address in the future) includes: - - Doesn't look fancy. + - Doesn't look fancy by default. - Limited layout features, intricate layouts are typically crafted in code. @@ -147,7 +148,8 @@ CODE - Ctrl+Z Undo. - Ctrl+Y or Ctrl+Shift+Z: Redo. - ESCAPE: Revert text to its original value. - - On OSX, controls are automatically adjusted to match standard OSX text editing 2ts and behaviors. + - On macOS, controls are automatically adjusted to match standard macOS text editing and behaviors. + (for 99% of shortcuts, Ctrl is replaced by Cmd on macOS). - KEYBOARD CONTROLS - Basic: @@ -200,7 +202,7 @@ CODE READ FIRST ---------- - - Remember to check the wonderful Wiki (https://github.com/ocornut/imgui/wiki) + - Remember to check the wonderful Wiki: https://github.com/ocornut/imgui/wiki - Your code creates the UI every frame of your application loop, if your code doesn't run the UI is gone! The UI can be highly dynamic, there are no construction or destruction steps, less superfluous data retention on your side, less state duplication, less state synchronization, fewer bugs. diff --git a/imgui.h b/imgui.h index c775df0be..be945c611 100644 --- a/imgui.h +++ b/imgui.h @@ -1,35 +1,36 @@ -// dear imgui, v1.92.5 WIP +// dear imgui, v1.92.5 // (headers) // Help: -// - See links below. // - Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp. All applications in examples/ are doing that. // - Read top of imgui.cpp for more details, links and comments. -// - Add '#define IMGUI_DEFINE_MATH_OPERATORS' before including this file (or in imconfig.h) to access courtesy maths operators for ImVec2 and ImVec4. +// - Add '#define IMGUI_DEFINE_MATH_OPERATORS' before including imgui.h (or in imconfig.h) to access courtesy maths operators for ImVec2 and ImVec4. // Resources: // - FAQ ........................ https://dearimgui.com/faq (in repository as docs/FAQ.md) // - Homepage ................... https://github.com/ocornut/imgui -// - Releases & changelog ....... https://github.com/ocornut/imgui/releases +// - Releases & Changelog ....... https://github.com/ocornut/imgui/releases // - Gallery .................... https://github.com/ocornut/imgui/issues?q=label%3Agallery (please post your screenshots/video there!) // - Wiki ....................... https://github.com/ocornut/imgui/wiki (lots of good stuff there) // - Getting Started https://github.com/ocornut/imgui/wiki/Getting-Started (how to integrate in an existing app by adding ~25 lines of code) // - Third-party Extensions https://github.com/ocornut/imgui/wiki/Useful-Extensions (ImPlot & many more) -// - Bindings/Backends https://github.com/ocornut/imgui/wiki/Bindings (language bindings, backends for various tech/engines) -// - Glossary https://github.com/ocornut/imgui/wiki/Glossary +// - Bindings/Backends https://github.com/ocornut/imgui/wiki/Bindings (language bindings + backends for various tech/engines) // - Debug Tools https://github.com/ocornut/imgui/wiki/Debug-Tools +// - Glossary https://github.com/ocornut/imgui/wiki/Glossary // - Software using Dear ImGui https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui // - Issues & support ........... https://github.com/ocornut/imgui/issues // - Test Engine & Automation ... https://github.com/ocornut/imgui_test_engine (test suite, test engine to automate your apps) +// - Web version of the Demo .... https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html (w/ source code browser) -// For first-time users having issues compiling/linking/running/loading fonts: +// For FIRST-TIME users having issues compiling/linking/running: // please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above. -// Everything else should be asked in 'Issues'! We are building a database of cross-linked knowledge there. +// EVERYTHING ELSE should be asked in 'Issues'! We are building a database of cross-linked knowledge there. +// Since 1.92, we encourage font loading questions to also be posted in 'Issues'. // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') -#define IMGUI_VERSION "1.92.5 WIP" -#define IMGUI_VERSION_NUM 19248 +#define IMGUI_VERSION "1.92.5" +#define IMGUI_VERSION_NUM 19250 #define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000 #define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198 diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 92857aa3f..a3996d961 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.92.5 WIP +// dear imgui, v1.92.5 // (demo code) // Help: diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 7111fb0b9..de6462295 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.92.5 WIP +// dear imgui, v1.92.5 // (drawing and font code) /* diff --git a/imgui_internal.h b/imgui_internal.h index 88af027d7..f577c170b 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1,4 +1,4 @@ -// dear imgui, v1.92.5 WIP +// dear imgui, v1.92.5 // (internal structures/api) // You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility. diff --git a/imgui_tables.cpp b/imgui_tables.cpp index 8f5a746f1..41fdf6a4c 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.92.5 WIP +// dear imgui, v1.92.5 // (tables and columns code) /* diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 0e49d1c19..e487b3f96 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.92.5 WIP +// dear imgui, v1.92.5 // (widgets code) /*