Docking: Fix for node created at the same time as windows that are still resizing (typically with io.ConfigDockingAlwaysTabBar) to not be zero/min sized. (#2109)

The fix delay their visibility by one frame, which is not ideal but not very problematic as the .ini data gets populated after that
This commit is contained in:
omar
2019-08-21 15:07:28 +02:00
parent a01d149369
commit 9e294be5c5
2 changed files with 50 additions and 0 deletions

View File

@ -929,6 +929,14 @@ enum ImGuiDataAuthority_
ImGuiDataAuthority_Window
};
enum ImGuiDockNodeState
{
ImGuiDockNodeState_Unknown,
ImGuiDockNodeState_HostWindowHiddenBecauseSingleWindow,
ImGuiDockNodeState_HostWindowHiddenBecauseWindowsAreResizing,
ImGuiDockNodeState_HostWindowVisible
};
// sizeof() 116~160
struct ImGuiDockNode
{
@ -945,6 +953,7 @@ struct ImGuiDockNode
int SplitAxis; // [Split node only] Split axis (X or Y)
ImGuiWindowClass WindowClass;
ImGuiDockNodeState State;
ImGuiWindow* HostWindow;
ImGuiWindow* VisibleWindow; // Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different window.
ImGuiDockNode* CentralNode; // [Root node only] Pointer to central node.