| 4783 | } |
| 4784 | |
| 4785 | static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_windows, ImGuiWindow* window) |
| 4786 | { |
| 4787 | out_sorted_windows->push_back(window); |
| 4788 | if (window->Active) |
| 4789 | { |
| 4790 | int count = window->DC.ChildWindows.Size; |
| 4791 | ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer); |
| 4792 | for (int i = 0; i < count; i++) |
| 4793 | { |
| 4794 | ImGuiWindow* child = window->DC.ChildWindows[i]; |
| 4795 | if (child->Active) |
| 4796 | AddWindowToSortBuffer(out_sorted_windows, child); |
| 4797 | } |
| 4798 | } |
| 4799 | } |
| 4800 | |
| 4801 | static void AddWindowToDrawData(ImGuiWindow* window, int layer) |
| 4802 | { |