Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread Gabriel Zachmann via Cocoa-dev
> > Otherwise, if sandboxing, refer to this discussion. > https://stackoverflow.com/questions/21956946/authenticate-user-objective-c-cocoa-sandboxing > > Thanks a lot for the link. After carefully rea

Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread Sandor Szatmari via Cocoa-dev
Gabriel, > On Jun 29, 2020, at 07:04, Gabriel Zachmann wrote: > >  >> I was hoping to convey to the OP that the goals of this question might have >> unintended consequences. > > > I realize there might be security concerns with what I am trying to do. > > Is there a way to lock the screen s

Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread Gabriel Zachmann via Cocoa-dev
> I was hoping to convey to the OP that the goals of this question might have > unintended consequences. I realize there might be security concerns with what I am trying to do. Is there a way to lock the screen such that the user has to provide their password to unlock it, and still have my a

Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread Sandor Szatmari via Cocoa-dev
> On Jun 29, 2020, at 02:46, じょいすじょん wrote: > >  > >>> On Jun 29, 2020, at 15:24, Sandor Szatmari >>> wrote: >>> >>> >>> On Jun 28, 2020, at 22:29, じょいすじょん via Cocoa-dev wrote: >>> >>> One way to do this is with the command line tool: >>> caffeinate >>> >>> You could run a

Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread Gabriel Zachmann via Cocoa-dev
Thanks! That seems rather what I need. Now, is there a way to check the user's password before my app quits or goes out of full-screen mode? Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list

Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread John Joyce via Cocoa-dev
> > On Jun 29, 2020, at 10:53, Graham Cox via Cocoa-dev > wrote: > > In the “old days”, your app could periodically call UpdateSystemActivity( > UsrActivity ) to prevent the screensaver kicking in. This has been deprecated > since 10.8, but the header for that function says it can be replac

Re: Prevent screen saver from starting, but don't prevent computer sleep

2020-06-29 Thread Graham Cox via Cocoa-dev
Then look at some of the other options in that API, e.g. IOPMAssertionDeclareUserActivity AFACS, this is the supported way to do the kinds of things you want, of it can be done at all. > On 29 Jun 2020, at 4:51 pm, Gabriel Zachmann wrote: > >> but the header for that function says it can be