From b36416bb33442cf47b657d9811e987e7cce461f6 Mon Sep 17 00:00:00 2001 From: wupl Date: Mon, 17 Apr 2023 18:13:46 +0800 Subject: [PATCH] fix: wake up on mac when screen locked --- src/lib/platform/OSXScreen.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/platform/OSXScreen.mm b/src/lib/platform/OSXScreen.mm index d41e321b..6d863f9a 100644 --- a/src/lib/platform/OSXScreen.mm +++ b/src/lib/platform/OSXScreen.mm @@ -847,6 +847,8 @@ OSXScreen::enter() IORegistryEntrySetCFProperty(entry, CFSTR("IORequestIdle"), kCFBooleanFalse); IOObjectRelease(entry); } + IOPMAssertionID assertionID; + IOPMAssertionDeclareUserActivity(CFSTR(""), kIOPMUserActiveLocal, &assertionID); avoidSupression(); }