From 7931b725576d3c7e82cedf7a81210cc0d5c7f4bb Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 13 Feb 2016 13:02:51 -0800 Subject: [PATCH] Idle timer when display is asleep --- Aware/AppDelegate.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Aware/AppDelegate.swift b/Aware/AppDelegate.swift index e69b2c8..2255778 100644 --- a/Aware/AppDelegate.swift +++ b/Aware/AppDelegate.swift @@ -68,6 +68,9 @@ class AppDelegate: NSObject, NSApplicationDelegate { if (sinceUserActivity > userIdleSeconds) { timerStart = NSDate() idle = true + } else if (CGDisplayIsAsleep(CGMainDisplayID()) == 1) { + timerStart = NSDate() + idle = true } else { idle = false }