protected override void SetKeepScreenOn(bool keepScreenOn) { if (KeepScreenOn == value) { return; } if (keepScreenOn) { IOKit.PreventUserIdleDisplaySleep("KeepScreenOn", out keepScreenOnId); } else { if (IOKit.AllowUserIdleDisplaySleep(keepScreenOnId)) { keepScreenOnId = 0; } } }
partial void DeactivateScreenLock() { IOKit.AllowUserIdleDisplaySleep(_displayRequestId); }