| 5816 | } |
| 5817 | |
| 5818 | static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_windows, ImGuiWindow* window) |
| 5819 | { |
| 5820 | out_sorted_windows->push_back(window); |
| 5821 | if (window->Active) |
| 5822 | { |
| 5823 | int count = window->DC.ChildWindows.Size; |
| 5824 | ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer); |
| 5825 | for (int i = 0; i < count; i++) |
| 5826 | { |
| 5827 | ImGuiWindow* child = window->DC.ChildWindows[i]; |
| 5828 | if (child->Active) |
| 5829 | AddWindowToSortBuffer(out_sorted_windows, child); |
| 5830 | } |
| 5831 | } |
| 5832 | } |
| 5833 | |
| 5834 | static void AddWindowToDrawData(ImGuiWindow* window, int layer) |
| 5835 | { |