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

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 17:08:23 -05:00
committed by GitHub
parent f8d3e0f3cd
commit 3209d817ca

View File

@@ -553,7 +553,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());