Code review comment for lp:~afrantzis/unity-system-compositor/fix-1485737-notification-with-inactivity-zero

Revision history for this message
Michael Terry (mterry) wrote :

Thanks for taking this branch over for me while I was EOD! :) Efficient.

Instead of directly comparing timeouts_inactivity (and making adding more timeout types even more complicated), might this be more generic if in the new "else" case we did:

else
{
   power_off_alarm->cancel();
   next_power_off = mir::time::Timestamp::max;
}

Instead of {}. This way, when a notification happens, the "new_next_power_off > next_power_off" check won't override the inactivity "never" timeout. But inactivity will still be turned off when the screen is manually turned off (as we do a next_power_off = {} when cancelling timers).

And of course the same for the dimmer logic.

Then we can drop all the extra if logic in this branch, I think?

review: Needs Information

« Back to merge proposal