summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;