Do not send "unresponsive" when window is closed.

This commit is contained in:
Cheng Zhao 2014-05-09 12:08:15 +08:00
parent a070f0fdb6
commit 3e6df19eff

View file

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