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
|
@ -285,6 +285,10 @@ void NativeWindow::SetShape(const std::vector<gfx::Rect>& rects) {
|
|||
widget()->SetShape(std::make_unique<std::vector<gfx::Rect>>(rects));
|
||||
}
|
||||
|
||||
bool NativeWindow::IsClosed() const {
|
||||
return is_closed_;
|
||||
}
|
||||
|
||||
void NativeWindow::SetSize(const gfx::Size& size, bool animate) {
|
||||
SetBounds(gfx::Rect(GetPosition(), size), animate);
|
||||
}
|
||||
|
@ -523,23 +527,8 @@ void NativeWindow::NotifyWindowCloseButtonClicked() {
|
|||
CloseImmediately();
|
||||
}
|
||||
|
||||
void NativeWindow::Close() {
|
||||
if (!IsClosable()) {
|
||||
WindowList::WindowCloseCancelled(this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_closed())
|
||||
CloseImpl();
|
||||
}
|
||||
|
||||
void NativeWindow::CloseImmediately() {
|
||||
if (!is_closed())
|
||||
CloseImmediatelyImpl();
|
||||
}
|
||||
|
||||
void NativeWindow::NotifyWindowClosed() {
|
||||
if (is_closed())
|
||||
if (is_closed_)
|
||||
return;
|
||||
|
||||
is_closed_ = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue