Browse Source

Merge pull request #9962 from ferreus/dev/vladimir_fix_8768

Fix #8768: Show() on already open modal
Cheng Zhao 7 years ago
parent
commit
a43553aa25
1 changed files with 2 additions and 1 deletions
  1. 2 1
      atom/browser/native_window_views.cc

+ 2 - 1
atom/browser/native_window_views.cc

@@ -374,7 +374,8 @@ bool NativeWindowViews::IsFocused() {
 }
 
 void NativeWindowViews::Show() {
-  if (is_modal() && NativeWindow::parent())
+  if (is_modal() && NativeWindow::parent() &&
+      !window_->native_widget_private()->IsVisible())
     static_cast<NativeWindowViews*>(NativeWindow::parent())->SetEnabled(false);
 
   window_->native_widget_private()->ShowWithWindowState(GetRestoredState());