OS X Front Application

Is there a way to tell in your application is the front most application in OS X or a call that is made when it is not.

suspend and resume do not work on OSX juce.

handleBroughtToFront is called but there is no equivlent like ​handleSendToBack


You might just want to check its value every couple of seconds to see when it changes

Thanks that is what I needed.

It would be great though if the lack of application suspended / resumed implementation on OS X could be addressed. You can register for notifications via:
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: selector: name: object:]
using NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification for the name argument.

1 Like

Why doesn’t suspend / resumed work on OSX?

(Cannot find it in mac_Windowing.mm, maybe I’m looking in the wrong file?)