Do not emit "unresponsive" when there is modal dialog
authorCheng Zhao <zcbenz@gmail.com>
Sun, 19 Jun 2016 07:55:45 +0000 (16:55 +0900)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 20 Jun 2016 02:16:41 +0000 (11:16 +0900)
atom/browser/native_window.cc

index 2ce6779..6db53df 100644 (file)
@@ -620,7 +620,7 @@ void NativeWindow::ScheduleUnresponsiveEvent(int ms) {
 void NativeWindow::NotifyWindowUnresponsive() {
   window_unresposive_closure_.Cancel();
 
-  if (!is_closed_ && !HasModalDialog())
+  if (!is_closed_ && !HasModalDialog() && IsEnabled())
     FOR_EACH_OBSERVER(NativeWindowObserver,
                       observers_,
                       OnRendererUnresponsive());