| 128 | } |
| 129 | |
| 130 | static void WindowUpdateVisibilities() |
| 131 | { |
| 132 | const auto itEnd = gWindowList.end(); |
| 133 | for (auto it = gWindowList.begin(); it != itEnd; ++it) |
| 134 | { |
| 135 | auto& window = *(*it); |
| 136 | if (window.viewport == nullptr) |
| 137 | { |
| 138 | window.isVisible = true; |
| 139 | continue; |
| 140 | } |
| 141 | if (window.classification == WindowClass::mainWindow) |
| 142 | { |
| 143 | window.isVisible = true; |
| 144 | window.viewport->isVisible = true; |
| 145 | continue; |
| 146 | } |
| 147 | window.isVisible = true; |
| 148 | window.viewport->isVisible = true; |
| 149 | for (auto itOther = std::next(it); itOther != itEnd; ++itOther) |
| 150 | { |
| 151 | const auto& otherWindow = *(*itOther); |
| 152 | if (otherWindow.flags.has(WindowFlag::dead)) |
| 153 | continue; |
| 154 | |
| 155 | if (otherWindow.windowPos.x <= window.windowPos.x && otherWindow.windowPos.y <= window.windowPos.y |
| 156 | && otherWindow.windowPos.x + otherWindow.width >= window.windowPos.x + window.width |
| 157 | && otherWindow.windowPos.y + otherWindow.height >= window.windowPos.y + window.height) |
| 158 | { |
| 159 | window.isVisible = false; |
| 160 | window.viewport->isVisible = false; |
| 161 | break; |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | void WindowCullDead() |
| 168 | { |
no test coverage detected