Docking, Tabs: toggling tab bar visibility marks saved settings as dirty. (#9380)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled

+ tweak/improve packing for ImGuiDockNode.
This commit is contained in:
ocornut
2026-04-27 16:53:57 +02:00
parent 417f5ed66d
commit ed9d1e7427
3 changed files with 7 additions and 2 deletions
+2
View File
@@ -177,6 +177,8 @@ Other Changes:
Docking+Viewports Branch:
- Docking:
- Toggling tab bar visibility marks saved settings as dirty. (#9380)
- Viewports:
- Added opaque `void* PlatformIconData` storage in viewport and ImGuiWindowClass
to allow passing icon information to a custom backend or hook. (#2715)
+3
View File
@@ -18922,10 +18922,13 @@ static void ImGui::DockNodeUpdateFlagsAndCollapse(ImGuiDockNode* node)
node->WantHiddenTabBarToggle = false;
// Apply toggles at a single point of the frame (here!)
const ImGuiDockNodeFlags prev_local_flags = node->LocalFlags;
if (node->Windows.Size > 1)
node->SetLocalFlags(node->LocalFlags & ~ImGuiDockNodeFlags_HiddenTabBar);
else if (node->WantHiddenTabBarToggle)
node->SetLocalFlags(node->LocalFlags ^ ImGuiDockNodeFlags_HiddenTabBar);
if ((node->LocalFlags ^ prev_local_flags) & ImGuiDockNodeFlags_SavedFlagsMask_)
MarkIniSettingsDirty(); // Bit flaky to only do this here. Perhaps compare node flags every frame? #9380
node->WantHiddenTabBarToggle = false;
DockNodeUpdateVisibleFlag(node);
+2 -2
View File
@@ -2031,7 +2031,7 @@ enum ImGuiDockNodeState
ImGuiDockNodeState_HostWindowVisible,
};
// sizeof() 156~192
// sizeof() 176~216
struct IMGUI_API ImGuiDockNode
{
ImGuiID ID;
@@ -2048,8 +2048,8 @@ struct IMGUI_API ImGuiDockNode
ImVec2 Size; // Current size
ImVec2 SizeRef; // [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
ImGuiAxis SplitAxis; // [Split node only] Split axis (X or Y)
ImGuiWindowClass WindowClass; // [Root node only]
ImU32 LastBgColor;
ImGuiWindowClass WindowClass; // [Root node only]
ImGuiWindow* HostWindow;
ImGuiWindow* VisibleWindow; // Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different window.