mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-19 01:24:20 +00:00
Nav: quick tap on NavMenu with no focused window doesn't focus one (holding still does) (#323)
This commit is contained in:
parent
e9c881e4de
commit
8b190f1100
1 changed files with 2 additions and 2 deletions
|
|
@ -2501,7 +2501,7 @@ static void NavUpdate()
|
|||
if (!IsKeyDownMap(ImGuiKey_NavMenu))
|
||||
{
|
||||
// Apply actual focus only when releasing the NavMenu button (until then the window was merely rendered front-most)
|
||||
if (g.NavWindowingTarget && (!g.NavWindow || g.NavWindowingTarget != g.NavWindow->RootNonPopupWindow))
|
||||
if (g.NavWindowingTarget && !g.NavWindowingToggleLayer && (!g.NavWindow || g.NavWindowingTarget != g.NavWindow->RootNonPopupWindow))
|
||||
{
|
||||
ImGui::FocusWindow(g.NavWindowingTarget);
|
||||
g.NavDisableHighlight = false;
|
||||
|
|
@ -2511,7 +2511,7 @@ static void NavUpdate()
|
|||
}
|
||||
|
||||
// Single press toggles NavLayer
|
||||
if (g.NavWindowingToggleLayer)
|
||||
if (g.NavWindowingToggleLayer && g.NavWindow)
|
||||
{
|
||||
if ((g.NavWindow->DC.NavLayerActiveFlags & (1<<1)) == 0 && (g.NavWindow->RootWindow->DC.NavLayerActiveFlags & (1<<1)) != 0)
|
||||
ImGui::FocusWindow(g.NavWindow->RootWindow);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue