GNOME Bugzilla – Bug 749643
Small power plugin cleanups
Last modified: 2019-03-20 11:26:37 UTC
While working on bug 749076 [1], I came up with these which shouldn't change any behavior but I think make things a bit cleaner and easier to reason about. [1] Basically, the fix for that is what the X server should also do for us and the reason we have reset_idletime() here.
Created attachment 303675 [details] [review] power: Unset temporary unidleness when moving to NORMAL mode Moving to NORMAL mode is the natural place to cancel temporary unidleness.
Created attachment 303676 [details] [review] power: Close sleep warning notification when moving to NORMAL mode This is what makes sense to do whenever moving to NORMAL mode so let's do it there instead of having it sprinkled around unconsistently.
Created attachment 303677 [details] [review] power: Tie backlight enabling with NORMAL mode reset_idletime() already ensures our user activity callback moves us to NORMAL mode when needed on X sessions and explicitly setting the mode on initialization makes more sense than just enabling the backlight.
Review of attachment 303675 [details] [review]: Correct me if I'm wrong, but this won't have the correct timeouts if we're on the lock screen for example, as the timeouts and behaviour will be different.
Review of attachment 303676 [details] [review]: Sure.
Review of attachment 303675 [details] [review]: Oh, and following up from the next review, wouldn't this cancel "idle will put the machine to sleep" (or at least hide the notifications)?
Review of attachment 303677 [details] [review]: Again, I'm pretty sure this breaks when on the lock screen.
What's the status of those patches now, Rui?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/266.