Skip to content

Commit 44aa9a4

Browse files
committed
Merge branch 'master' into docking
# Conflicts: # imgui_internal.h
2 parents c99ac24 + 5d41268 commit 44aa9a4

File tree

9 files changed

+71
-27
lines changed

9 files changed

+71
-27
lines changed

docs/CHANGELOG.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ HOW TO UPDATE?
3636
- Please report any issue!
3737

3838
-----------------------------------------------------------------------
39-
VERSION 1.92.1 WIP (In Progress)
39+
VERSION 1.92.1 (Released 2025-07-09)
4040
-----------------------------------------------------------------------
4141

42-
Breaking changes:
42+
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.1
4343

44-
Other changes:
44+
Changes:
4545

4646
- Fonts: added ImFontAtlas::SetFontLoader() to dynamically change font
4747
loader at runtime without using internal API. (#8752, #8465)
@@ -61,6 +61,9 @@ Other changes:
6161
- Demo: Added "Text -> Font Size" demo section. (#8738) [@Demonese]
6262
- CI: Fixed dllimport/dllexport tests. (#8757) [@AidanSun05]
6363
- CI: Updated to use latest Windows image + VS2022.
64+
- Debug Tools: added IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS to detect
65+
id conflicts _before_ hovering. This is very slow and should only be used
66+
temporarily. (#8651, #7961, #7669)
6467
- Examples: GLFW+OpenGL3, GLFW+WGPU: Emscripten Makefiles uses GLFW port
6568
'contrib.glfw3' which offers better HiDPI support. (#8742) [@pthom]
6669
- Backends: GLFW, SDL2 made ImGui_ImplGLFW_GetContentScaleXXX() and
@@ -87,7 +90,7 @@ Docking+Viewports Branch:
8790
VERSION 1.92.0 (Released 2025-06-25)
8891
-----------------------------------------------------------------------
8992

90-
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92
93+
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.0
9194

9295
THIS VERSION CONTAINS THE LARGEST AMOUNT OF BREAKING CHANGES SINCE 2015!
9396
I TRIED REALLY HARD TO KEEP THEM TO A MINIMUM, REDUCE THE AMOUNT OF INTERFERENCE,
@@ -554,7 +557,7 @@ Docking+Viewports Branch:
554557
user code is discarding the 'bool *p_open=false output' from Begin().
555558
Because we allowed the Win32 window to close early, Windows destroyed
556559
it and our imgui window became not visible even though user code was
557-
still submitting it.
560+
still submitting it. (#8670)
558561
- Backends: Win32: Viewports: handle WM_DPICHANGED in backend when
559562
ImGuiConfigFlags_DpiEnableScaleViewports is enabled.
560563
- Backends: GLFW, SDL2, SDL3, Apple: provide Platform_GetWindowFramebufferScale handler,

imconfig.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@
129129
//#define IM_DEBUG_BREAK IM_ASSERT(0)
130130
//#define IM_DEBUG_BREAK __debugbreak()
131131

132+
//---- Debug Tools: Enable highlight ID conflicts _before_ hovering items. When io.ConfigDebugHighlightIdConflicts is set.
133+
// (THIS WILL SLOW DOWN DEAR IMGUI. Only use occasionally and disable after use)
134+
//#define IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS
135+
132136
//---- Debug Tools: Enable slower asserts
133137
//#define IMGUI_DEBUG_PARANOID
134138

imgui.cpp

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.92.1 WIP
1+
// dear imgui, v1.92.1
22
// (main code and documentation)
33

44
// Help:
@@ -4107,7 +4107,7 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
41074107
WheelingWindowStartFrame = WheelingWindowScrolledFrame = -1;
41084108
WheelingWindowReleaseTimer = 0.0f;
41094109

4110-
DebugDrawIdConflicts = 0;
4110+
DebugDrawIdConflictsId = 0;
41114111
DebugHookIdInfo = 0;
41124112
HoveredId = HoveredIdPreviousFrame = 0;
41134113
HoveredIdPreviousFrameItemCount = 0;
@@ -4354,6 +4354,12 @@ void ImGui::Initialize()
43544354
DockContextInitialize(&g);
43554355
#endif
43564356

4357+
// Print a debug message when running with debug feature IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS because it is very slow.
4358+
// DO NOT COMMENT OUT THIS MESSAGE. IT IS DESIGNED TO REMIND YOU THAT IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS SHOULD ONLY BE TEMPORARILY ENABLED.
4359+
#ifdef IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS
4360+
DebugLog("IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS is enabled.\nMust disable after use! Otherwise Dear ImGui will run slower.\n");
4361+
#endif
4362+
43574363
// ImDrawList/ImFontAtlas are designed to function without ImGui, and 99% of it works without an ImGui context.
43584364
// But this link allows us to facilitate/handle a few edge cases better.
43594365
ImFontAtlas* atlas = g.IO.Fonts;
@@ -4839,7 +4845,8 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
48394845
return true;
48404846
}
48414847

4842-
// Internal facing ItemHoverable() used when submitting widgets. Differs slightly from IsItemHovered().
4848+
// Internal facing ItemHoverable() used when submitting widgets. THIS IS A SUBMISSION NOT A HOVER CHECK.
4849+
// Returns whether the item was hovered, logic differs slightly from IsItemHovered().
48434850
// (this does not rely on LastItemData it can be called from a ButtonBehavior() call not following an ItemAdd() call)
48444851
// FIXME-LEGACY: the 'ImGuiItemFlags item_flags' parameter was added on 2023-06-28.
48454852
// If you used this in your legacy/custom widgets code:
@@ -4851,11 +4858,12 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag
48514858
ImGuiWindow* window = g.CurrentWindow;
48524859

48534860
// Detect ID conflicts
4861+
// (this is specifically done here by comparing on hover because it allows us a detection of duplicates that is algorithmically extra cheap, 1 u32 compare per item. No O(log N) lookup whatsoever)
48544862
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
48554863
if (id != 0 && g.HoveredIdPreviousFrame == id && (item_flags & ImGuiItemFlags_AllowDuplicateId) == 0)
48564864
{
48574865
g.HoveredIdPreviousFrameItemCount++;
4858-
if (g.DebugDrawIdConflicts == id)
4866+
if (g.DebugDrawIdConflictsId == id)
48594867
window->DrawList->AddRect(bb.Min - ImVec2(1,1), bb.Max + ImVec2(1,1), IM_COL32(255, 0, 0, 255), 0.0f, ImDrawFlags_None, 2.0f);
48604868
}
48614869
#endif
@@ -5560,9 +5568,9 @@ void ImGui::NewFrame()
55605568

55615569
// [DEBUG]
55625570
if (!g.IO.ConfigDebugHighlightIdConflicts || !g.IO.KeyCtrl) // Count is locked while holding CTRL
5563-
g.DebugDrawIdConflicts = 0;
5571+
g.DebugDrawIdConflictsId = 0;
55645572
if (g.IO.ConfigDebugHighlightIdConflicts && g.HoveredIdPreviousFrameItemCount > 1)
5565-
g.DebugDrawIdConflicts = g.HoveredIdPreviousFrame;
5573+
g.DebugDrawIdConflictsId = g.HoveredIdPreviousFrame;
55665574

55675575
// Update HoveredId data
55685576
if (!g.HoveredIdPreviousFrame)
@@ -11509,9 +11517,9 @@ void ImGui::ErrorCheckEndFrameFinalizeErrorTooltip()
1150911517
{
1151011518
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
1151111519
ImGuiContext& g = *GImGui;
11512-
if (g.DebugDrawIdConflicts != 0 && g.IO.KeyCtrl == false)
11520+
if (g.DebugDrawIdConflictsId != 0 && g.IO.KeyCtrl == false)
1151311521
g.DebugDrawIdConflictsCount = g.HoveredIdPreviousFrameItemCount;
11514-
if (g.DebugDrawIdConflicts != 0 && g.DebugItemPickerActive == false && BeginErrorTooltip())
11522+
if (g.DebugDrawIdConflictsId != 0 && g.DebugItemPickerActive == false && BeginErrorTooltip())
1151511523
{
1151611524
Text("Programmer error: %d visible items with conflicting ID!", g.DebugDrawIdConflictsCount);
1151711525
BulletText("Code should use PushID()/PopID() in loops, or append \"##xx\" to same-label identifiers!");
@@ -11680,6 +11688,21 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu
1168011688
// Empty identifier are valid and useful in a small amount of cases, but 99.9% of the time you want to use "##something".
1168111689
// READ THE FAQ: https://dearimgui.com/faq
1168211690
IM_ASSERT(id != window->ID && "Cannot have an empty ID at the root of a window. If you need an empty label, use ## and read the FAQ about how the ID Stack works!");
11691+
11692+
// [DEBUG] Highlight all conflicts WITHOUT needing to hover. THIS WILL SLOW DOWN DEAR IMGUI. DON'T KEEP ACTIVATED.
11693+
// This will only work for items submitted with ItemAdd(). Some very rare/odd/unrecommended code patterns are calling ButtonBehavior() without ItemAdd().
11694+
#ifdef IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS
11695+
if ((g.LastItemData.ItemFlags & ImGuiItemFlags_AllowDuplicateId) == 0)
11696+
{
11697+
int* p_alive = g.DebugDrawIdConflictsAliveCount.GetIntRef(id, -1); // Could halve lookups if we knew ImGuiStorage can store 64-bit, or by storing FrameCount as 30-bits + highlight as 2-bits. But the point is that we should not pretend that this is fast.
11698+
int* p_highlight = g.DebugDrawIdConflictsHighlightSet.GetIntRef(id, -1);
11699+
if (*p_alive == g.FrameCount)
11700+
*p_highlight = g.FrameCount;
11701+
*p_alive = g.FrameCount;
11702+
if (*p_highlight >= g.FrameCount - 1)
11703+
window->DrawList->AddRect(bb.Min - ImVec2(1, 1), bb.Max + ImVec2(1, 1), IM_COL32(255, 0, 0, 255), 0.0f, ImDrawFlags_None, 2.0f);
11704+
}
11705+
#endif
1168311706
}
1168411707
//if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG]
1168511708
//if ((g.LastItemData.ItemFlags & ImGuiItemFlags_NoNav) == 0)
@@ -21786,6 +21809,10 @@ void ImGui::ShowMetricsWindow(bool* p_open)
2178621809
}
2178721810
};
2178821811

21812+
#ifdef IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS
21813+
TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS is enabled.\nMust disable after use! Otherwise Dear ImGui will run slower.\n");
21814+
#endif
21815+
2178921816
// Tools
2179021817
if (TreeNode("Tools"))
2179121818
{

imgui.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.92.1 WIP
1+
// dear imgui, v1.92.1
22
// (headers)
33

44
// Help:
@@ -28,8 +28,8 @@
2828

2929
// Library Version
3030
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
31-
#define IMGUI_VERSION "1.92.1 WIP"
32-
#define IMGUI_VERSION_NUM 19202
31+
#define IMGUI_VERSION "1.92.1"
32+
#define IMGUI_VERSION_NUM 19210
3333
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
3434
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
3535
#define IMGUI_HAS_VIEWPORT // In 'docking' WIP branch.

imgui_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.92.1 WIP
1+
// dear imgui, v1.92.1
22
// (demo code)
33

44
// Help:

imgui_draw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.92.1 WIP
1+
// dear imgui, v1.92.1
22
// (drawing and font code)
33

44
/*

imgui_internal.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.92.1 WIP
1+
// dear imgui, v1.92.1
22
// (internal structures/api)
33

44
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
@@ -987,6 +987,7 @@ enum ImGuiItemStatusFlags_
987987
ImGuiItemStatusFlags_Visible = 1 << 8, // [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()).
988988
ImGuiItemStatusFlags_HasClipRect = 1 << 9, // g.LastItemData.ClipRect is valid.
989989
ImGuiItemStatusFlags_HasShortcut = 1 << 10, // g.LastItemData.Shortcut valid. Set by SetNextItemShortcut() -> ItemAdd().
990+
//ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8, // Removed IN 1.90.1 (Dec 2023). The trigger is part of g.NavActivateId. See commit 54c1bdeceb.
990991

991992
// Additional status + semantic for ImGuiTestEngine
992993
#ifdef IMGUI_ENABLE_TEST_ENGINE
@@ -1039,6 +1040,7 @@ enum ImGuiButtonFlagsPrivate_
10391040
ImGuiButtonFlags_NoFocus = 1 << 22, // [EXPERIMENTAL: Not very well specced]. Don't focus parent window when clicking.
10401041
ImGuiButtonFlags_PressedOnMask_ = ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold,
10411042
ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickRelease,
1043+
//ImGuiButtonFlags_NoKeyModifiers = ImGuiButtonFlags_NoKeyModsAllowed, // Renamed in 1.91.4
10421044
};
10431045

10441046
// Extend ImGuiComboFlags_
@@ -1700,6 +1702,7 @@ enum ImGuiNavRenderCursorFlags_
17001702
ImGuiNavHighlightFlags_Compact = ImGuiNavRenderCursorFlags_Compact, // Renamed in 1.91.4
17011703
ImGuiNavHighlightFlags_AlwaysDraw = ImGuiNavRenderCursorFlags_AlwaysDraw, // Renamed in 1.91.4
17021704
ImGuiNavHighlightFlags_NoRounding = ImGuiNavRenderCursorFlags_NoRounding, // Renamed in 1.91.4
1705+
//ImGuiNavHighlightFlags_TypeThin = ImGuiNavRenderCursorFlags_Compact, // Renamed in 1.90.2
17031706
#endif
17041707
};
17051708

@@ -2385,7 +2388,7 @@ struct ImGuiContext
23852388
ImVec2 WheelingAxisAvg;
23862389

23872390
// Item/widgets state and tracking information
2388-
ImGuiID DebugDrawIdConflicts; // Set when we detect multiple items with the same identifier
2391+
ImGuiID DebugDrawIdConflictsId; // Set when we detect multiple items with the same identifier
23892392
ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
23902393
ImGuiID HoveredId; // Hovered widget, filled during the frame
23912394
ImGuiID HoveredIdPreviousFrame;
@@ -2474,18 +2477,19 @@ struct ImGuiContext
24742477
ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusedWindow'
24752478
ImGuiID NavFocusScopeId; // Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of the same scope)
24762479
ImGuiNavLayer NavLayer; // Focused layer (main scrolling layer, or menu/title bar layer)
2477-
ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItem()
2480+
ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItemByID()
24782481
ImGuiID NavActivateDownId; // ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? NavId : 0
24792482
ImGuiID NavActivatePressedId; // ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat)
24802483
ImGuiActivateFlags NavActivateFlags;
24812484
ImVector<ImGuiFocusScopeData> NavFocusRoute; // Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain.
24822485
ImGuiID NavHighlightActivatedId;
24832486
float NavHighlightActivatedTimer;
2484-
ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame.
2487+
ImGuiID NavNextActivateId; // Set by ActivateItemByID(), queued until next frame.
24852488
ImGuiActivateFlags NavNextActivateFlags;
24862489
ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse
24872490
ImGuiSelectionUserData NavLastValidSelectionUserData; // Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing an item that doesn't have selection data.
24882491
ImS8 NavCursorHideFrames;
2492+
//ImGuiID NavActivateInputId; // Removed in 1.89.4 (July 2023). This is now part of g.NavActivateId and sets g.NavActivateFlags |= ImGuiActivateFlags_PreferInput. See commit c9a53aa74, issue #5606.
24892493

24902494
// Navigation: Init & Move Requests
24912495
bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd()
@@ -2699,6 +2703,10 @@ struct ImGuiContext
26992703
ImGuiIDStackTool DebugIDStackTool;
27002704
ImGuiDebugAllocInfo DebugAllocInfo;
27012705
ImGuiDockNode* DebugHoveredDockNode; // Hovered dock node.
2706+
#if defined(IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS) && !defined(IMGUI_DISABLE_DEBUG_TOOLS)
2707+
ImGuiStorage DebugDrawIdConflictsAliveCount;
2708+
ImGuiStorage DebugDrawIdConflictsHighlightSet;
2709+
#endif
27022710

27032711
// Misc
27042712
float FramerateSecPerFrame[60]; // Calculate estimate of framerate for user over the last 60 frames..
@@ -2707,7 +2715,7 @@ struct ImGuiContext
27072715
float FramerateSecPerFrameAccum;
27082716
int WantCaptureMouseNextFrame; // Explicit capture override via SetNextFrameWantCaptureMouse()/SetNextFrameWantCaptureKeyboard(). Default to -1.
27092717
int WantCaptureKeyboardNextFrame; // "
2710-
int WantTextInputNextFrame; // Copied in EndFrame() from g.PlatformImeData.WanttextInput. Needs to be set for some backends (SDL3) to emit character inputs.
2718+
int WantTextInputNextFrame; // Copied in EndFrame() from g.PlatformImeData.WantTextInput. Needs to be set for some backends (SDL3) to emit character inputs.
27112719
ImVector<char> TempBuffer; // Temporary text buffer
27122720
char TempKeychordName[64];
27132721

@@ -3518,7 +3526,7 @@ namespace ImGui
35183526
// This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are
35193527
// much harder to design and implement than expected. I have a couple of private branches on this matter but it's not simple. For now implementing the easy ones.
35203528
IMGUI_API void FocusItem(); // Focus last item (no selection/activation).
3521-
IMGUI_API void ActivateItemByID(ImGuiID id); // Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the next frame when the item is encountered again.
3529+
IMGUI_API void ActivateItemByID(ImGuiID id); // Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the next frame when the item is encountered again. Was called 'ActivateItem()' before 1.89.7.
35223530

35233531
// Inputs
35243532
// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions.
@@ -3961,6 +3969,7 @@ namespace ImGui
39613969
//inline bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0) { return TreeNodeUpdateNextOpen(id, flags); } // Renamed in 1.89
39623970
//inline bool IsKeyPressedMap(ImGuiKey key, bool repeat = true) { IM_ASSERT(IsNamedKey(key)); return IsKeyPressed(key, repeat); } // Removed in 1.87: Mapping from named key is always identity!
39633971

3972+
// Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets which used FocusableItemRegister():
39643973
// Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets which used FocusableItemRegister():
39653974
// (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool tab_focused = FocusableItemRegister(...)'
39663975
// (Old) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool tab_focused = (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_Focused) != 0'

imgui_tables.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.92.1 WIP
1+
// dear imgui, v1.92.1
22
// (tables and columns code)
33

44
/*

imgui_widgets.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dear imgui, v1.92.1 WIP
1+
// dear imgui, v1.92.1
22
// (widgets code)
33

44
/*
@@ -573,7 +573,8 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
573573
bool pressed = false;
574574
bool hovered = ItemHoverable(bb, id, item_flags);
575575

576-
// Special mode for Drag and Drop where holding button pressed for a long time while dragging another item triggers the button
576+
// Special mode for Drag and Drop used by openables (tree nodes, tabs etc.)
577+
// where holding the button pressed for a long time while drag a payload item triggers the button.
577578
if (g.DragDropActive && (flags & ImGuiButtonFlags_PressedOnDragDropHold) && !(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoHoldToOpenOthers))
578579
if (IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
579580
{

0 commit comments

Comments
 (0)