mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Docking: Fixed CTRL+TAB back into a docked window not selecting menu layer when no item are on main layer.
Could merge on master.
This commit is contained in:
@ -6964,7 +6964,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
|
||||
window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
|
||||
window->DC.NavLayersActiveMask = window->DC.NavLayersActiveMaskNext;
|
||||
window->DC.NavLayersActiveMaskNext = 0x00;
|
||||
window->DC.NavHideHighlightOneFrame = false;
|
||||
window->DC.NavHasScroll = (window->ScrollMax.y > 0.0f);
|
||||
|
||||
@ -7125,6 +7124,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
skip_items = true;
|
||||
window->SkipItems = skip_items;
|
||||
|
||||
// Only clear NavLayersActiveMaskNext when marked as visible, so a CTRL+Tab back can use a safe value.
|
||||
if (!window->SkipItems)
|
||||
window->DC.NavLayersActiveMaskNext = 0x00;
|
||||
|
||||
// Sanity check: there are two spots which can set Appearing = true
|
||||
// - when 'window_just_activated_by_user' is set -> HiddenFramesCannotSkipItems is set -> SkipItems always false
|
||||
// - in BeginDocked() path when DockNodeIsVisible == DockTabIsVisible == true -> hidden _should_ be all zero // FIXME: Not formally proven, hence the assert.
|
||||
|
Reference in New Issue
Block a user