GNOME Bugzilla – Bug 792209
Keep screen off while screensaver is on when adding inhibitors
Last modified: 2018-01-15 16:25:12 UTC
If an application adds an idle inhibitor and the screensaver is already on then GSD will currently unblank the screen. This is pointless, as the session is locked and the screen just shows black. One case where this happens is if Firefox starts playing a sound in a tab while the screen is locked.
Created attachment 366309 [details] [review] power: Keep screen off while screensaver is on when adding inhibitors When a new idle inhibitor is added then the state needs to be reconfigured. This would also happen if the screen is already turned off because the screensaver is active.
Created attachment 366310 [details] [review] power: Add test that inhibitors don't unblank the screensaver
Review of attachment 366309 [details] [review]: ::: plugins/power/gsd-power-manager.c @@ +1722,2 @@ /* are we inhibited from going idle */ + if (!manager->priv->session_is_active || (is_idle_inhibited && !manager->priv->screensaver_active)) { Can you please add a linefeed after "||" @@ +1722,3 @@ /* are we inhibited from going idle */ + if (!manager->priv->session_is_active || (is_idle_inhibited && !manager->priv->screensaver_active)) { + if (is_idle_inhibited && !manager->priv->screensaver_active) You might want to split this up so that the debug messages are accurate.
Review of attachment 366310 [details] [review]: Looks good.
Created attachment 366675 [details] [review] power: Keep screen off while screensaver is on when adding inhibitors When a new idle inhibitor is added then the state needs to be forced to normal mode even when the user is idle. However, this should not happen if the screensaver is active at the time.
Review of attachment 366675 [details] [review]: Sure.
Attachment 366310 [details] pushed as 7f7af94 - power: Add test that inhibitors don't unblank the screensaver Attachment 366675 [details] pushed as 75b331e - power: Keep screen off while screensaver is on when adding inhibitors