mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-13 00:09:55 +02:00
Merge branch 'viewport' into docking
# Conflicts: # examples/example_glfw_opengl2/main.cpp # examples/example_glfw_opengl3/main.cpp # examples/example_glfw_vulkan/main.cpp # examples/example_sdl_opengl2/main.cpp # examples/example_sdl_opengl3/main.cpp # examples/example_sdl_vulkan/main.cpp # examples/example_win32_directx10/main.cpp # examples/example_win32_directx11/main.cpp # examples/example_win32_directx12/main.cpp # examples/example_win32_directx9/main.cpp
This commit is contained in:
@ -8813,6 +8813,7 @@ static void ImGui::NavUpdateWindowing()
|
||||
// Apply final focus
|
||||
if (apply_focus_window && (g.NavWindow == NULL || apply_focus_window != g.NavWindow->RootWindowDockStop))
|
||||
{
|
||||
ImGuiViewport* previous_viewport = g.NavWindow ? g.NavWindow->Viewport : NULL;
|
||||
g.NavDisableHighlight = false;
|
||||
g.NavDisableMouseHover = true;
|
||||
apply_focus_window = NavRestoreLastChildNavWindow(apply_focus_window);
|
||||
@ -8824,6 +8825,10 @@ static void ImGui::NavUpdateWindowing()
|
||||
// If the window only has a menu layer, select it directly
|
||||
if (apply_focus_window->DC.NavLayerActiveMask == (1 << 1))
|
||||
g.NavLayer = 1;
|
||||
|
||||
// Request OS level focus
|
||||
if (apply_focus_window->Viewport != previous_viewport && g.PlatformIO.Platform_SetWindowFocus)
|
||||
g.PlatformIO.Platform_SetWindowFocus(apply_focus_window->Viewport);
|
||||
}
|
||||
if (apply_focus_window)
|
||||
g.NavWindowingTarget = NULL;
|
||||
|
Reference in New Issue
Block a user