Bug 779843 - nsIdleService never fires the "back" notification if there's only one listener, r=vlad.

This commit is contained in:
Florian Queze 2012-08-02 19:38:30 +02:00
parent 086469addf
commit 19cd7abe78

View File

@ -645,6 +645,8 @@ nsIdleService::IdleTimerCallback(void)
notifyList.AppendObject(curListener.observer);
// This listener is now idle.
curListener.isIdle = true;
// Remember we have someone idle.
mAnyObserverIdle = true;
} else {
// Listeners that are not timed out yet are candidates for timing out.
mDeltaToNextIdleSwitchInS = PR_MIN(mDeltaToNextIdleSwitchInS,
@ -666,9 +668,6 @@ nsIdleService::IdleTimerCallback(void)
return;
}
// Remember we have someone idle.
mAnyObserverIdle = true;
// We need a text string to send with any state change events.
nsAutoString timeStr;
timeStr.AppendInt(currentIdleTimeInS);