diff options
author | Simon Rettberg | 2019-11-15 17:04:11 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-11-15 17:04:11 +0100 |
commit | eb7869c197c9e327357aa0c1871c7aff478adbe9 (patch) | |
tree | 0543d583356c5bbd0be034901f01d9cfa37342a6 /src | |
parent | Formatting (diff) | |
download | idle-daemon-eb7869c197c9e327357aa0c1871c7aff478adbe9.tar.gz idle-daemon-eb7869c197c9e327357aa0c1871c7aff478adbe9.tar.xz idle-daemon-eb7869c197c9e327357aa0c1871c7aff478adbe9.zip |
Don't poll .no-saver if dpms and screen saver are disabled
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -147,7 +147,8 @@ int main( int argc, char **argv ) } } // If this file exists, the user doesn't want screen saver or DPMS to trigger - const bool useSaver = ( usr->saverFile[0] == '-' || access( usr->saverFile, F_OK ) == -1 ); + const bool useSaver = ( config.saverTimeout > 0 || config.dpmsTimeout > 0 ) + && ( usr->saverFile[0] == '-' || access( usr->saverFile, F_OK ) == -1 ); const int idleTime = NOW - ( usr->lastActivity + usr->lastActivityOffset ); if ( config.dpmsTimeout > 0 && screen.screenStandby != SCREEN_UNKNOWN ) { int want = SCREEN_UNKNOWN; |