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

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:56:33 -05:00
committed by GitHub
parent 14565211f7
commit 53819a8a2a

View File

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