new_editor: filter closing windows from interaction
This commit is contained in:
@@ -276,7 +276,9 @@ void EditorWindowHostRuntime::RenderAllWindows(
|
||||
transferBatches.reserve(m_windows.size());
|
||||
|
||||
for (const std::unique_ptr<EditorWindow>& window : m_windows) {
|
||||
if (window == nullptr || window->GetHwnd() == nullptr) {
|
||||
if (window == nullptr ||
|
||||
window->GetHwnd() == nullptr ||
|
||||
window->IsClosing()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -293,7 +295,9 @@ void EditorWindowHostRuntime::RenderAllWindows(
|
||||
}
|
||||
|
||||
for (WindowFrameTransferBatch& batch : transferBatches) {
|
||||
if (batch.sourceWindow == nullptr || batch.sourceWindow->GetHwnd() == nullptr) {
|
||||
if (batch.sourceWindow == nullptr ||
|
||||
batch.sourceWindow->GetHwnd() == nullptr ||
|
||||
batch.sourceWindow->IsClosing()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -310,7 +314,9 @@ void EditorWindowHostRuntime::HandleDestroyedWindow(HWND hwnd) {
|
||||
for (const std::unique_ptr<EditorWindow>& otherWindow : m_windows) {
|
||||
if (otherWindow != nullptr &&
|
||||
otherWindow.get() != window &&
|
||||
otherWindow->GetHwnd() != nullptr) {
|
||||
otherWindow->GetHwnd() != nullptr &&
|
||||
!otherWindow->IsClosing()) {
|
||||
otherWindow->MarkClosing();
|
||||
PostMessageW(otherWindow->GetHwnd(), WM_CLOSE, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user