power: Correctly put the screen and computer to sleep when idle
The idle timer was only being set up when dimming was enabled. By default on AC this is disabled, and this meant the x_idle boolean flag never got set. This meant the display or computer sleep timeouts were then never set. By using the dim timeout and just ignoring the state change if no display dim is enabled we make sure that the computer and display timeouts are set correctly. Additionally, make sure that we check for the suspend inhibit when we want to suspend, rather than when we setup the timers, as new inhibits may be present. Resolves https://bugzilla.gnome.org/show_bug.cgi?id=659066
parent
67785fa2
Please register or sign in to comment