Merge branch 'master' into docking

# Conflicts:
#	backends/imgui_impl_dx12.cpp
#	examples/example_win32_directx12/main.cpp
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index 1466da7..90c5d91 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -36,9 +36,11 @@
 - Please report any issue!
 
 -----------------------------------------------------------------------
- VERSION 1.93.1 WIP (In Progress)
+ VERSION 1.93.1 (Released 2026-11-26)
 -----------------------------------------------------------------------
 
+Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.93.1
+
 Breaking Changes:
 
 Autumn cleanup of stuff marked obsolete more than two years ago:
@@ -77,6 +79,10 @@
 - TreeNode:
   - TreeNodeGetOpen(): added flags parameter to allow passing `ImGuiTreeNodeFlags_DefaultOpen`
     or `ImGuiTreeNodeFlags_Leaf`. (#9569, #9592, #3823, #9251) [@adalisk-emikhaylov, @Yaki-Blake]
+  - CollapsingHeader(): avoid extending frame boundaries by `WindowPadding.x*0.5f`
+    on each side: it is inconsistent and tends to exhibits issues in various setups.
+    (that extension has been here since 1.42). (#9181, #6170)
+  - Fixed combining `ImGuiTreeNodeFlags_Framed` and `ImGuiTreeNodeFlags_SpanLabelWidth`.
 - Popups:
   - Modals: fixed an assert displaying a modal in an environment where
     `io.DisplayFramebufferScale` is not an integer (regression in 1.93.0). (#9598)
@@ -110,23 +116,29 @@
   - Detect if the parameters leading `AddFontDefault()` to implicitly select either
     `AddFontDefaultBitmap()` or `AddFontDefaultVector()` have changed between init
     time and first frame. (#9591)
-- ImVec2: added a check for cases where a custom `IM_VEC2_CLASS_EXTRA` macro
-  adds an extra `operator=` to ImVec2. This isn't supported but should not
-  be needed as you should have a constructor to convert from your type to ImVec2.
-- Misc: update stb_textedit 1.14->1.15.
-  - InputText: Up/PageUp on the first line now moves the cursor to the beginning
-    of the line, including when extending a selection. [@blackedout01]
-- Misc: update stb_truetype 1.26->1.27.
-  - Fonts: fixed incorrect glyph mapping with certain character maps, loading fonts
-    with only a Microsoft Symbol character map, and rendering scaled composite glyphs.
-  - Fixed an out-of-bounds read with single-point off-curve contours.
-- Misc: update stb_rect_pack 1.01->1.02.
-  - Fixed packing determinism by not depending on qsort() tiebreak.
+- Misc:
+  - Added `IsItemDisabled()` convenience helper. (#9127, #9636, #4675)
+    (same as `GetItemFlags() & ImGuiItemFlags_Disabled`).
+  - ImVec2: added a check for cases where a custom `IM_VEC2_CLASS_EXTRA` macro
+    adds an extra `operator=` to ImVec2. This isn't supported but should not
+    be needed as you should have a constructor to convert from your type to ImVec2.
+  - Updated stb_textedit 1.14->1.15.
+    - InputText: Up/PageUp on the first line now moves the cursor to the beginning
+      of the line, including when extending a selection. [@blackedout01]
+  - Updated stb_truetype 1.26->1.27.
+    - Fonts: fixed incorrect glyph mapping with certain character maps, loading fonts
+      with only a Microsoft Symbol character map, and rendering scaled composite glyphs.
+    - Fixed an out-of-bounds read with single-point off-curve contours.
+  - Updated stb_rect_pack 1.01->1.02.
+    - Fixed packing determinism by not depending on `qsort()` tiebreak.
 - CI: added some ARM64 builds. (#9593) [@Harishmcw]
-- Examples: renamed various helper batch files from build_win32.bat to build_win.bat
-  to reflect that they can also build X64 or ARM64, given the right environment.
-  Made the script detect the environment when needed (e.g. to specify library path).
-- Examples: added support for ARM64 in selected build_win.bat helpers. (#9593) [@Harishmcw]
+- Examples:
+  - Added support for ARM64 in selected build_win.bat helpers. (#9593) [@Harishmcw]
+  - WGPU: using C++20 to build WGPU examples as Dawn require it.
+  - Win32+DirectX12: minor fixes facilitate recreating device. (#9633, #9632) [@grzybr1]
+  - Renamed various helper batch files from `build_win32.bat` to `build_win.bat`
+    to reflect that they can also build X64 or ARM64, given the right environment.
+    Made the script detect the environment when needed (e.g. to specify library path).
 - Backends:
   - DirectX9: pre-transforming vertices and using `D3DFVF_XYZRHW` vertex format, largely
     increasing performances when in `D3DCREATE_SOFTWARE_VERTEXPROCESSING` mode. (#9628)
@@ -169,7 +181,6 @@
     - fixed `ImGui_ImplMetal4_NewFrame()` waiting forever when using more than one frame
       in flight, once a secondary viewport has been rendered. (#9621, #9624) [@lailoken]
 
-
 -----------------------------------------------------------------------
  VERSION 1.93.0 (Released 2026-10-14)
 -----------------------------------------------------------------------
diff --git a/docs/README.md b/docs/README.md
index 1dea581..c6d7afc 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -55,8 +55,8 @@
 ImGui::InputText("string", buf, IM_COUNTOF(buf));
 ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
 ```
-<img width="412" height="236" alt="sample code output (dark)" src="https://github.com/user-attachments/assets/32b838df-6378-498b-84a8-9a79ee6264a7" />
-<img width="412" height="236" alt="sample code output (light)" src="https://github.com/user-attachments/assets/f075e2b0-98de-4be8-acb4-99ba0c9966cd" />
+<img width="640" height="326" alt="sample code output (dark)" src="https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v193/capture_readme_styles_0000.png" />
+<img width="640" height="326" alt="sample code output (light)" src="https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v193/capture_readme_styles_0001.png" />
 
 ```cpp
 // Create a window called "My First Tool", with a menu bar.
diff --git a/examples/example_glfw_wgpu/Makefile.emscripten b/examples/example_glfw_wgpu/Makefile.emscripten
index ff386fe..0767252 100644
--- a/examples/example_glfw_wgpu/Makefile.emscripten
+++ b/examples/example_glfw_wgpu/Makefile.emscripten
@@ -41,6 +41,7 @@
 LDFLAGS += -s ASSERTIONS=1
 
 # Using Dawn-based WebGPU port (requires Emscripten >= 4.0.10)
+CPPFLAGS += -std=c++20 # Dawn requires C++20
 EMS += --use-port=emdawnwebgpu
 LDFLAGS += --use-port=emdawnwebgpu
 
diff --git a/examples/example_sdl2_wgpu/Makefile.emscripten b/examples/example_sdl2_wgpu/Makefile.emscripten
index ebc7f97..afe8ea5 100644
--- a/examples/example_sdl2_wgpu/Makefile.emscripten
+++ b/examples/example_sdl2_wgpu/Makefile.emscripten
@@ -41,6 +41,7 @@
 LDFLAGS += -s ASSERTIONS=1
 
 # Using Dawn-based WebGPU port (requires Emscripten >= 4.0.10)
+CPPFLAGS += -std=c++20 # Dawn requires C++20
 EMS += --use-port=emdawnwebgpu
 LDFLAGS += --use-port=emdawnwebgpu
 
diff --git a/examples/example_sdl3_wgpu/Makefile.emscripten b/examples/example_sdl3_wgpu/Makefile.emscripten
index c84acc7..329f88a 100644
--- a/examples/example_sdl3_wgpu/Makefile.emscripten
+++ b/examples/example_sdl3_wgpu/Makefile.emscripten
@@ -41,6 +41,7 @@
 LDFLAGS += -s ASSERTIONS=1
 
 # Using Dawn-based WebGPU port (requires Emscripten >= 4.0.10)
+CPPFLAGS += -std=c++20 # Dawn requires C++20
 EMS += --use-port=emdawnwebgpu
 LDFLAGS += --use-port=emdawnwebgpu
 
diff --git a/examples/example_win32_directx12/main.cpp b/examples/example_win32_directx12/main.cpp
index f95f4cd..21c9f9e 100644
--- a/examples/example_win32_directx12/main.cpp
+++ b/examples/example_win32_directx12/main.cpp
@@ -492,9 +492,14 @@
 {
     CleanupRenderTarget();
     if (g_pSwapChain) { g_pSwapChain->SetFullscreenState(false, nullptr); g_pSwapChain->Release(); g_pSwapChain = nullptr; }
-    if (g_hSwapChainWaitableObject != nullptr) { CloseHandle(g_hSwapChainWaitableObject); }
-    for (UINT i = 0; i < APP_NUM_FRAMES_IN_FLIGHT; i++)
-        if (g_frameContext[i].CommandAllocator) { g_frameContext[i].CommandAllocator->Release(); g_frameContext[i].CommandAllocator = nullptr; }
+    if (g_hSwapChainWaitableObject != nullptr) { CloseHandle(g_hSwapChainWaitableObject); g_hSwapChainWaitableObject = nullptr; }
+    g_fenceLastSignaledValue = 0;
+    g_frameIndex = 0;
+    for (FrameContext& fc : g_frameContext)
+    {
+        if (fc.CommandAllocator) { fc.CommandAllocator->Release(); fc.CommandAllocator = nullptr; }
+        fc.FenceValue = 0;
+    }
     if (g_pd3dCommandQueue) { g_pd3dCommandQueue->Release(); g_pd3dCommandQueue = nullptr; }
     if (g_pd3dCommandList) { g_pd3dCommandList->Release(); g_pd3dCommandList = nullptr; }
     if (g_pd3dRtvDescHeap) { g_pd3dRtvDescHeap->Release(); g_pd3dRtvDescHeap = nullptr; }
@@ -502,6 +507,7 @@
     if (g_fence) { g_fence->Release(); g_fence = nullptr; }
     if (g_fenceEvent) { CloseHandle(g_fenceEvent); g_fenceEvent = nullptr; }
     if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = nullptr; }
+    g_pd3dSrvDescHeapAlloc.Destroy();
 
 #ifdef DX12_ENABLE_DEBUG_LAYER
     IDXGIDebug1* pDebug = nullptr;
@@ -551,6 +557,10 @@
 
 void WaitForPendingOperations()
 {
+    // Nothing to wait for if the device has already been torn down: CleanupRenderTarget() calls us,
+    // and CleanupDeviceD3D() may be called more than once while a lost device is being recreated.
+    if (g_pd3dCommandQueue == nullptr || g_fence == nullptr)
+        return;
     if (FAILED(g_pd3dCommandQueue->Signal(g_fence, ++g_fenceLastSignaledValue)))
         return; // Device lost: there is nothing left to wait for.
     if (FAILED(g_fence->SetEventOnCompletion(g_fenceLastSignaledValue, g_fenceEvent)))
diff --git a/imgui.cpp b/imgui.cpp
index bafbbc9..e941b4b 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.93.1 WIP
+// dear imgui, v1.93.1
 // (main code and documentation)
 
 // Help:
@@ -6781,6 +6781,12 @@
     return true;
 }
 
+bool ImGui::IsItemDisabled()
+{
+    ImGuiContext& g = *GImGui;
+    return (g.LastItemData.ItemFlags & ImGuiItemFlags_Disabled);
+}
+
 // Important: this can be useful but it is NOT equivalent to the behavior of e.g.Button()!
 // Most widgets have specific reactions based on mouse-up/down state, mouse position etc.
 bool ImGui::IsItemClicked(ImGuiMouseButton mouse_button)
diff --git a/imgui.h b/imgui.h
index 154e42e..6e2bf90 100644
--- a/imgui.h
+++ b/imgui.h
@@ -1,4 +1,4 @@
-// dear imgui, v1.93.1 WIP
+// dear imgui, v1.93.1
 // (headers)
 
 // Help:
@@ -29,8 +29,8 @@
 
 // Library Version
 // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
-#define IMGUI_VERSION       "1.93.1 WIP"
-#define IMGUI_VERSION_NUM   19303
+#define IMGUI_VERSION       "1.93.1"
+#define IMGUI_VERSION_NUM   19310
 #define IMGUI_HAS_TABLE             // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
 #define IMGUI_HAS_TEXTURES          // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
 #define IMGUI_HAS_VIEWPORT          // In 'docking' WIP branch.
@@ -1059,6 +1059,7 @@
     IMGUI_API bool          IsItemHovered(ImGuiHoveredFlags flags = 0);                         // is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options.
     IMGUI_API bool          IsItemActive();                                                     // is the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item. Items that don't interact will always return false)
     IMGUI_API bool          IsItemFocused();                                                    // is the last item focused for keyboard/gamepad navigation?
+    IMGUI_API bool          IsItemDisabled();                                                   // is the last item disabled? (e.g. typically in a BeginDisabled()/EndDisabled() block)
     IMGUI_API bool          IsItemClicked(ImGuiMouseButton mouse_button = 0);                   // is the last item hovered and mouse clicked on? (**)  == IsMouseClicked(mouse_button) && IsItemHovered()Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in function definition.
     IMGUI_API bool          IsItemVisible();                                                    // is the last item visible? (items may be out of sight because of clipping/scrolling)
     IMGUI_API bool          IsItemEdited();                                                     // did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets.
diff --git a/imgui_demo.cpp b/imgui_demo.cpp
index 3e2d563..a3a489e 100644
--- a/imgui_demo.cpp
+++ b/imgui_demo.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.93.1 WIP
+// dear imgui, v1.93.1
 // (demo code)
 
 // Help:
@@ -4542,11 +4542,10 @@
                         ImGui::Text("This is a drag and drop source");
                         ImGui::EndDragDropSource();
                     }
-                    if (node_n == 2 && (base_flags & ImGuiTreeNodeFlags_SpanLabelWidth))
+                    if ((base_flags & ImGuiTreeNodeFlags_SpanLabelWidth))
                     {
-                        // Item 2 has an additional inline button to help demonstrate SpanLabelWidth.
                         ImGui::SameLine();
-                        if (ImGui::SmallButton("button")) {}
+                        ImGui::SmallButton("more"); // Additional inline button to help demonstrate SpanLabelWidth.
                     }
                     if (is_open)
                     {
@@ -4569,6 +4568,11 @@
                         ImGui::Text("This is a drag and drop source");
                         ImGui::EndDragDropSource();
                     }
+                    if ((base_flags & ImGuiTreeNodeFlags_SpanLabelWidth))
+                    {
+                        ImGui::SameLine();
+                        ImGui::SmallButton("more"); // Additional inline button to help demonstrate SpanLabelWidth.
+                    }
                 }
             }
             if (align_label_with_current_x_position)
diff --git a/imgui_draw.cpp b/imgui_draw.cpp
index 6276220..1b17622 100644
--- a/imgui_draw.cpp
+++ b/imgui_draw.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.93.1 WIP
+// dear imgui, v1.93.1
 // (drawing and font code)
 
 /*
diff --git a/imgui_internal.h b/imgui_internal.h
index d75c9b8..577d999 100644
--- a/imgui_internal.h
+++ b/imgui_internal.h
@@ -1,4 +1,4 @@
-// dear imgui, v1.93.1 WIP
+// dear imgui, v1.93.1
 // (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 820b4dd..ff18184 100644
--- a/imgui_tables.cpp
+++ b/imgui_tables.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.93.1 WIP
+// dear imgui, v1.93.1
 // (tables and columns code)
 
 /*
diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp
index 3d316b2..5b29abc 100644
--- a/imgui_widgets.cpp
+++ b/imgui_widgets.cpp
@@ -1,4 +1,4 @@
-// dear imgui, v1.93.1 WIP
+// dear imgui, v1.93.1
 // (widgets code)
 
 /*
@@ -7050,35 +7050,37 @@
     const ImGuiStyle& style = g.Style;
 
     // When not framed, we vertically increase height up to typical framed widget height
-    const bool display_frame = (flags & ImGuiTreeNodeFlags_Framed) != 0;
-    const bool use_frame_padding = (display_frame || (flags & ImGuiTreeNodeFlags_FramePadding));
+    const bool is_framed = (flags & ImGuiTreeNodeFlags_Framed) != 0;
+    const bool is_leaf = (flags & ImGuiTreeNodeFlags_Leaf) != 0;
+    const bool is_framed_undecorated = is_framed && ((flags & (ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_Bullet)) == ImGuiTreeNodeFlags_Leaf); // Framed leaf without bullet has left-adjusted text (#2159)
+    const bool use_frame_padding = (is_framed || (flags & ImGuiTreeNodeFlags_FramePadding));
     const ImVec2 padding = use_frame_padding ? style.FramePadding : ImVec2(style.FramePadding.x, ImMin(window->DC.CurrLineTextBaseOffset, style.FramePadding.y));
 
     if (!label_end)
         label_end = FindRenderedTextEnd(label);
     const ImVec2 label_size = CalcTextSize(label, label_end, false);
 
-    const float icon_width = g.FontSize + padding.x * 2;
-    const float text_offset_x = display_frame ? icon_width + padding.x : icon_width;    // Collapsing arrow width + Spacing
+    const float icon_width = is_framed_undecorated ? padding.x : g.FontSize + padding.x * 2;
+    const float text_offset_x = is_framed ? icon_width + padding.x : icon_width;                // Collapsing arrow width + Spacing
     const float text_offset_y = use_frame_padding ? ImMax(style.FramePadding.y, window->DC.CurrLineTextBaseOffset) : window->DC.CurrLineTextBaseOffset; // Latch before ItemSize changes it
-    const float text_width = icon_width + label_size.x;                                 // Include collapsing arrow
+    const float text_width = icon_width + label_size.x + (is_framed ? padding.x * 2.0f : 0.0f); // Include collapsing arrow
 
     const float frame_height = label_size.y + padding.y * 2;
     const bool span_all_columns = (flags & ImGuiTreeNodeFlags_SpanAllColumns) != 0 && (g.CurrentTable != NULL);
     const bool span_all_columns_label = (flags & ImGuiTreeNodeFlags_LabelSpanAllColumns) != 0 && (g.CurrentTable != NULL);
     ImRect frame_bb;
     frame_bb.Min.x = span_all_columns ? window->ParentWorkRect.Min.x : (flags & ImGuiTreeNodeFlags_SpanFullWidth) ? window->WorkRect.Min.x : window->DC.CursorPos.x;
-    frame_bb.Min.y = window->DC.CursorPos.y + (text_offset_y - padding.y);
     frame_bb.Max.x = span_all_columns ? window->ParentWorkRect.Max.x : (flags & ImGuiTreeNodeFlags_SpanLabelWidth) ? window->DC.CursorPos.x + text_width + padding.x : window->WorkRect.Max.x;
+    frame_bb.Min.y = window->DC.CursorPos.y + (text_offset_y - padding.y);
     frame_bb.Max.y = window->DC.CursorPos.y + (text_offset_y - padding.y) + frame_height;
-    if (display_frame)
+    /*if (display_frame) // Removed 2026/11/24
     {
         const float outer_extend = IM_TRUNC(window->WindowPadding.x * 0.5f); // Framed header expand a little outside of current limits
         frame_bb.Min.x -= outer_extend;
         frame_bb.Max.x += outer_extend;
-    }
+    }*/
 
-    ImVec2 text_pos(window->DC.CursorPos.x + text_offset_x, window->DC.CursorPos.y + text_offset_y);
+    const ImVec2 text_pos(window->DC.CursorPos.x + text_offset_x, window->DC.CursorPos.y + text_offset_y);
     ItemSize(ImVec2(text_width, frame_height), padding.y);
 
     // For regular tree nodes, we arbitrary allow to click past 2 worth of ItemSpacing
@@ -7087,7 +7089,7 @@
         interact_bb.Max.x = frame_bb.Min.x + text_width + (label_size.x > 0.0f ? style.ItemSpacing.x * 2.0f : 0.0f);
 
     // Compute open and multi-select states before ItemAdd() as it clear NextItem data.
-    ImGuiID storage_id = (g.NextItemData.HasFlags & ImGuiNextItemDataFlags_HasStorageID) ? g.NextItemData.StorageId : id;
+    const ImGuiID storage_id = (g.NextItemData.HasFlags & ImGuiNextItemDataFlags_HasStorageID) ? g.NextItemData.StorageId : id;
     bool is_open = TreeNodeUpdateNextOpen(storage_id, flags);
 
     bool is_visible;
@@ -7126,7 +7128,6 @@
                 store_tree_node_stack_data = true;
     }
 
-    const bool is_leaf = (flags & ImGuiTreeNodeFlags_Leaf) != 0;
     if (!is_visible)
     {
         if (flags & ImGuiTreeNodeFlags_DrawLinesToNodes)
@@ -7269,7 +7270,7 @@
         ImGuiNavRenderCursorFlags nav_render_cursor_flags = ImGuiNavRenderCursorFlags_Compact;
         if (is_multi_select)
             nav_render_cursor_flags |= ImGuiNavRenderCursorFlags_AlwaysDraw; // Always show the nav rectangle
-        if (display_frame)
+        if (is_framed)
         {
             // Framed type
             const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
@@ -7281,8 +7282,6 @@
                 RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.60f, text_pos.y + g.FontSize * 0.5f), text_col);
             else if (!is_leaf)
                 RenderArrow(window->DrawList, ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y), text_col, is_open ? ((flags & ImGuiTreeNodeFlags_UpsideDownArrow) ? ImGuiDir_Up : ImGuiDir_Down) : ImGuiDir_Right, 1.0f);
-            else // Leaf without bullet, left-adjusted text
-                text_pos.x -= text_offset_x - padding.x;
             if (flags & ImGuiTreeNodeFlags_ClipLabelForTrailingButton)
                 frame_bb.Max.x -= g.FontSize + style.FramePadding.x;
             if (g.LogEnabled)
@@ -7311,7 +7310,7 @@
             TreeNodeDrawLineToChildNode(ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y + g.FontSize * 0.5f));
 
         // Label
-        if (display_frame)
+        if (is_framed)
             RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size);
         else
             RenderText(text_pos, label, label_end, false);