2
0
Эх сурвалжийг харах

Internals: Docking: revert 32a3c61 in favor of user explicitely calling SetWindowParentWindowForFocusRoute(). (#6798)

The revert doesn't look the same as 32a3c61 as since then we are baking focus roue into NavFocusScopePath().
ocornut 1 жил өмнө
parent
commit
69b64e2b73
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -6842,7 +6842,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
 
         // There's little point to expose a flag to set this: because the interesting cases won't be using parent_window_in_stack,
         // e.g. linking a tool window in a standalone viewport to a document window, regardless of their Begin() stack parenting. (#6798)
-        window->ParentWindowForFocusRoute = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window_in_stack : NULL;
+        window->ParentWindowForFocusRoute = (window->RootWindow != window) ? parent_window_in_stack : NULL;
     }
 
     // Add to focus scope stack