summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2019-05-14 15:34:50 +0200
committerSimon Rettberg2019-05-14 15:34:50 +0200
commitbd7aa4abfae5ed5bc21ff92be1698cef94da3020 (patch)
tree0c2130592176a4b6a8fc691b9f9eb9e3c5118037 /src
parentf() -> f(void) (diff)
downloadidle-daemon-bd7aa4abfae5ed5bc21ff92be1698cef94da3020.tar.gz
idle-daemon-bd7aa4abfae5ed5bc21ff92be1698cef94da3020.tar.xz
idle-daemon-bd7aa4abfae5ed5bc21ff92be1698cef94da3020.zip
Fix DPMS timeout calculation
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 3501f5a..312c16d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -143,7 +143,7 @@ int main( int argc, char **argv )
int want = SCREEN_UNKNOWN;
if ( config.logoutTimeout > 0 && idleTime + 300 > config.logoutTimeout ) {
want = SCREEN_ON;
- } else if ( ! nextAction.disarmed && nextAction.deadline != 0 && monoNOW - nextAction.deadline < 300 ) {
+ } else if ( ! nextAction.disarmed && nextAction.deadline != 0 && nextAction.deadline - monoNOW < 300 ) {
want = SCREEN_ON;
} else if ( idleTime > config.dpmsTimeout && screen.idleSeconds >= 60 ) {
want = SCREEN_OFF;