Browse Source

Fix #8768: Show() on already open modal

Calling show() on an already open modal causes the parent to become unusable
Vladimir Vainer 7 years ago
parent
commit
06b5acdac0
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());