Do not emit "unresponsive" when there is modal dialog

This commit is contained in:
Cheng Zhao 2016-06-19 16:55:45 +09:00
parent f4bec78ccb
commit 074903ca33

View file

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