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

2020-06-27 Thread Graham Cox via Cocoa-dev
You can make your app trigger a command-line program and pass params using NSTask. It’s not difficult to use. But in this case you might want to negotiate this with the user - apps that just go ahead and change MY system preferences are being user-hostile to say the least. —Graham > On 28 Ju

Re: Launching in fullscreen gives "Funk" sound sometimes

2020-06-27 Thread Andy Lee via Cocoa-dev
On Jun 24, 2020, at 5:23 AM, Gabriel Zachmann via Cocoa-dev wrote: > I tried to add this in -viewDidLoad in MasterWindowController: > >[[[self view] window] makeKeyAndOrderFront: NULL]; Some questions that may or may not help: - Are you sure the above line of code is being called? (I woul

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

2020-06-27 Thread Sandor Szatmari via Cocoa-dev
G, > On Jun 27, 2020, at 12:47, Gabriel Zachmann via Cocoa-dev > wrote: > > Does anyone know how to programmatically disable macOS from launching the > screen saver on macOS? > I would like to do that in one of my apps. Not sure in general, but in a managed host situation this type of system

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

2020-06-27 Thread Gabriel Zachmann via Cocoa-dev
Does anyone know how to programmatically disable macOS from launching the screen saver on macOS? I would like to do that in one of my apps. Note that I do NOT want to disable screen sleep, nor system sleep. I just want to set the idle time to "Never" , which you would do manually by going to Sy

Re: Launching in fullscreen gives "Funk" sound sometimes

2020-06-27 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for the hint. I have now managed to find the time to try it out, alas, it's not the other app either that creates the "Funk" sound. Could it be that no app at all has the keyboard focus? And how can I make sure that my app really has the focus? Best regards, Gabriel > > It’s