fix: revert moving IsClosed() and IsClosable() into NativeWindow::Close() (#47482)
Revert "refactor: move `IsClosed()` and `IsClosable()` tests into `NativeWindow::Close()` (#46888)"
This reverts commit 3faddd5ae2
.
This commit is contained in:
parent
2ad762e075
commit
3536d4976a
8 changed files with 35 additions and 35 deletions
|
@ -84,7 +84,7 @@ void WindowList::CloseAllWindows() {
|
|||
std::ranges::reverse(weak_windows);
|
||||
#endif
|
||||
for (const auto& window : weak_windows) {
|
||||
if (window)
|
||||
if (window && !window->IsClosed())
|
||||
window->Close();
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ void WindowList::DestroyAllWindows() {
|
|||
ConvertToWeakPtrVector(GetInstance()->windows_);
|
||||
|
||||
for (const auto& window : weak_windows) {
|
||||
if (window)
|
||||
if (window && !window->IsClosed())
|
||||
window->CloseImmediately();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue