mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +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
@ -2501,7 +2501,7 @@ static void NavUpdate()
|
|||||||
if (!IsKeyDownMap(ImGuiKey_NavMenu))
|
if (!IsKeyDownMap(ImGuiKey_NavMenu))
|
||||||
{
|
{
|
||||||
// Apply actual focus only when releasing the NavMenu button (until then the window was merely rendered front-most)
|
// 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);
|
ImGui::FocusWindow(g.NavWindowingTarget);
|
||||||
g.NavDisableHighlight = false;
|
g.NavDisableHighlight = false;
|
||||||
@ -2511,7 +2511,7 @@ static void NavUpdate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Single press toggles NavLayer
|
// 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)
|
if ((g.NavWindow->DC.NavLayerActiveFlags & (1<<1)) == 0 && (g.NavWindow->RootWindow->DC.NavLayerActiveFlags & (1<<1)) != 0)
|
||||||
ImGui::FocusWindow(g.NavWindow->RootWindow);
|
ImGui::FocusWindow(g.NavWindow->RootWindow);
|
||||||
|
Loading…
Reference in New Issue
Block a user