| 4821 | } |
| 4822 | |
| 4823 | static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_windows, ImGuiWindow* window) |
| 4824 | { |
| 4825 | out_sorted_windows->push_back(window); |
| 4826 | if (window->Active) |
| 4827 | { |
| 4828 | int count = window->DC.ChildWindows.Size; |
| 4829 | ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer); |
| 4830 | for (int i = 0; i < count; i++) |
| 4831 | { |
| 4832 | ImGuiWindow* child = window->DC.ChildWindows[i]; |
| 4833 | if (child->Active) |
| 4834 | AddWindowToSortBuffer(out_sorted_windows, child); |
| 4835 | } |
| 4836 | } |
| 4837 | } |
| 4838 | |
| 4839 | static void AddWindowToDrawData(ImGuiWindow* window, int layer) |
| 4840 | { |