fix: revert the parent window remained interactive after the modal window was opened (#49020)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: bill.shen <15865969+cucbin@users.noreply.github.com>
This commit is contained in:
trop[bot]
2025-11-19 16:59:27 -05:00
committed by GitHub
parent 38cb7ab080
commit 9b89d19b1b

View File

@@ -555,7 +555,7 @@ bool NativeWindowViews::IsFocused() const {
}
void NativeWindowViews::Show() {
if (is_modal() && NativeWindow::parent())
if (is_modal() && NativeWindow::parent() && !widget()->IsVisible())
static_cast<NativeWindowViews*>(parent())->IncrementChildModals();
widget()->native_widget_private()->Show(GetRestoredState(), gfx::Rect());