summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-11-15 17:04:11 +0100
committerSimon Rettberg2019-11-15 17:04:11 +0100
commiteb7869c197c9e327357aa0c1871c7aff478adbe9 (patch)
tree0543d583356c5bbd0be034901f01d9cfa37342a6
parentFormatting (diff)
downloadidle-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
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index b14ba2c..c3d2cd0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;