From 31ac9352af8664bdafefed30023f5556e7c5c4e6 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 (@shymega's note: from debauchee/barrier#1927, thank you @junbujianwpl) --- 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 c8c74abdb..e03871e52 100644 --- a/src/lib/platform/OSXScreen.mm +++ b/src/lib/platform/OSXScreen.mm @@ -811,6 +811,8 @@ IORegistryEntrySetCFProperty(entry, CFSTR("IORequestIdle"), kCFBooleanFalse); IOObjectRelease(entry); } + IOPMAssertionID assertionID; + IOPMAssertionDeclareUserActivity(CFSTR(""), kIOPMUserActiveLocal, &assertionID); avoidSupression(); }